Chemists have developed a safer method to produce nitrogen-rich compounds using an azide-to-diazo reaction. These compounds form the backbone of pharmaceuticals, agrochemicals, dyes, and functional materials.