Diazo refers to a type of organic compound called diazo compound that has two linked nitrogen atoms (azo) as a terminal functional group. The general formula is R2C=N2. The simplest example of a diazo compound is diazomethane. The electronic structure of diazo compounds involves a positive charge on the central nitrogen and negative charge distributed between the terminal nitrogen and the carbon. Some of the most stable diazo compounds are α-diazo-ß-diketones and α-diazo-ß-diesters since the negative charge is delocalized into the carbonyls. In contrast, most alkyldiazo compounds are explosive. A commercially relevant diazo compound is ethyl diazoacetate (N2CHCOOEt). A group of isomeric compounds with only few similar properties are the diazirines, where the carbon and two nitrogens are linked as a ring.
Four resonance structures can be drawn:
Diazo compounds should not be confused with azo compounds of the type R-N=N-R or with diazonium compounds of the type R-N2+.
Diazo compounds were first produced by Peter Griess who had discovered a versatile new chemical reaction, as detailed in his 1858 paper "Preliminary notice on the influence of nitrous acid on aminonitro- and aminodinitrophenol."
Several laboratory methods exist for the preparation of diazo compounds:
Alpha-acceptor-substituted primary aliphatic amines R-CH2-NH2 (R = COOR, CN, CHO, COR) react with nitrous acid to generate the diazo compound.
An example of an electrophilic substitution using a diazomethyl compound is that of a reaction between an acyl halide and diazomethane, for example the first step in the Arndt-Eistert synthesis.