The encoded biosynthesis of proteins provides the ultimate paradigm for high-fidelity synthesis of long polymers of defined sequence and composition, but it is limited to polymerizing the canonical amino acids. Recent advances have built on genetic code expansion - which commonly permits the cellular incorporation of one type of non-canonical amino acid into a protein - to enable the encoded incorporation of several distinct non-canonical amino acids. Developments include strategies to read quadruplet codons, use non-natural DNA base pairs, synthesize completely recoded genomes and create orthogonal translational components with reprogrammed specificities. These advances may enable the genetically encoded synthesis of non-canonical biopolymers and provide a platform for transforming the discovery and evolution of new materials and therapeutics.