Glycosylation is an abundant post-translational modification that is important in disease and biotechnology. Current methods to understand and engineer glycosylation cannot sufficiently explore the vast experimental landscapes required to accurately predict and design glycosylation sites modified by glycosyltransferases. Here we describe a systematic platform for glycosylation sequence characterization and optimization by rapid expression and screening (GlycoSCORES), which combines cell-free protein synthesis and mass spectrometry of self-assembled monolayers. We produced six N- and O-linked polypeptide-modifying glycosyltransferases from bacteria and humans in vitro and rigorously determined their substrate specificities using 3,480 unique peptides and 13,903 unique reaction conditions. We then used GlycoSCORES to optimize and design small glycosylation sequence motifs that directed efficient N-linked glycosylation in vitro and in the Escherichia coli cytoplasm for three heterologous proteins, including the human immunoglobulin Fc domain. We find that GlycoSCORES is a broadly applicable method to facilitate fundamental understanding of glycosyltransferases and engineer synthetic glycoproteins.