A diazo compund is any class of organic substances that have the characteristic atomic grouping:
R2C = N + = N - as a part of their molecular structure. R represents a hydrogen atom or any of a large number of organic groups.
The most common diazo compound is diazomethane which is a toxic, explosive yellow gas usually prepared as a solution in ether and often used in laboratory procedures for converting carboxylic acids into their methyl esters or into their homologues .
Diazo compounds are usually used to generate their respective carbenes. Thermolytic release of nitrogen is the accepted mechanism.