Abstract DNA, RNA, and proteins are synthesized using template molecules, but glycosylation is not believed to be constrained by a template. However, if cellular environment is the only determinant of glycosylation, all sites should receive the same glycans on average. This template-free assertion is inconsistent with observations of microheterogeneity—wherein each site receives distinct and reproducible glycan structures. Here, we test the assumption of template-free glycan biosynthesis. Through structural analysis of site-specific glycosylation data, we find protein-sequence and structural features that predict specific glycan features. To quantify these relationships, we present a new amino acid substitution matrix that describes “glycoimpact” -- how glycosylation varies with protein structure. High-glycoimpact amino acids co-evolve with glycosites, and glycoimpact is high when estimates of amino acid conservation and variant pathogenicity diverge. We report hundreds of disease variants near glycosites with high-glycoimpact, including several with known links to aberrant glycosylation (e.g., Oculocutaneous Albinism, Jakob-Creutzfeldt disease, Gerstmann-Straussler-Scheinker, and Gaucher’s Disease). Finally, we validate glycoimpact quantification by studying oligomannose-complex glycan ratios on HIV ENV, differential sialylation on IgG3 Fc, differential glycosylation on SARS-CoV-2 Spike, and fucose-modulated function of a tuberculosis monoclonal antibody. In all, we show glycan biosynthesis is accurately guided by specific, genetically-encoded rules, and this presents a plausible refutation to the assumption of template-free glycosylation. Summary Unlike DNA, RNA, and proteins, the dogma describes glycosylation as metabolically determined and unconstrained by template molecules. Without template-based expectations for glycan structures, research is hampered, obscuring how these critical molecules impact the behavior in thousands of human glycoproteins. Here, we challenge the assertion of template-free glycosylation and discover protein-encoded rules for glycan biosynthesis, by quantifying associations between glycan and protein features, which we call “glycoimpact.” We estimate 45-55% of amino acids substitutions will minimally change protein structure, but significantly impact glycosylation. We find that “glycoimpact” influences canonical substitution matrices and genetic variant pathogenicity. We identify thousands of high-glycoimpact pathogenic variants spanning hundreds of diseases, including several linked to aberrant glycosylation including Oculocutaneous Albinism, Prion, and Gaucher’s Disease. We also successfully predict glycosylation in HIV, SARS-CoV-2, and immunoglobulins. Overall, we present rules defining a genetic encoding for glycosylation, enabling glycan prediction and discovery of glycoprotein functions in health and disease.