In organic chemistry, the diazo group is an organic moiety consisting of two linked nitrogen atoms (azo, ) at the terminal position. Overall charge-neutral organic compounds containing the diazo group bound to a carbon atom are called diazo compounds or diazoalkanes and are described by the general structural formula . The simplest example of a diazo compound is diazomethane, . Diazo compounds () should not be confused with azo compounds ({{chem2|R\sN\dN\sR) or with diazonium compounds (). Structure The electronic structure of diazo compounds is characterized by π electron density delocalized over the α-carbon and two nitrogen atoms, along with an orthogonal π system with electron density delocalized over only the terminal nitrogen atoms. Because all octet rule-satisfying resonance forms of diazo compounds have formal charges, they are members of a class of compounds known as 1,3-dipoles. Some of the most stable diazo compounds are α-diazo-β-diketones and α-diazo-β-diesters, in which the electron density is further delocalized into an electron-withdrawing carbonyl group. In contrast, most diazoalkanes without electron-withdrawing substituents, including diazomethane itself, 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: Compounds with the diazo moiety should be distinguished from diazonium compounds, which have the same terminal azo group but bear an overall positive charge, and azo compounds in which the azo group bridges two organic substituents. History 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." Synthesis Several methods exist for the preparation of diazo compounds. From amines Alpha-acceptor-substituted primary aliphatic amines R-CH2-NH2 (R = COOR, CN, CHO, COR) react with nitrous acid to generate the diazo compound. From diazomethyl compounds 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. By diazo transfer In diazo transfer certain carbon acids react with tosyl azide in the presence of a weak base like triethylamine or DBU. The byproduct is the corresponding tosylamide (p-toluenesulfonamide). This reaction is also called the Regitz diazo transfer. Examples are the synthesis of tert-butyl diazoacetate and diazomalonate. Methyl phenyldiazoacetate is generated