Thioaldehyde is a highly electrophilic group under aqueous conditions and can be generated via oxidative enzymatic modifications of cysteine residues in peptides and proteins. Herein, we report the installation of thioaldehyde and aldehyde groups at the C-terminus of peptides by flavin-dependent cysteine decarboxylases from the biosynthesis of ribosomally synthesized and post-translationally modified peptides. The in situ generated (thio)aldehyde is utilized as a reactive handle for peptide bioconjugation and macrocyclization.