Diazomethane, CH2N2, is a yellow, poisonous, potentially explosive compound, which is a gas at room temperature. The structure of diazomethane is explained using three resonance forms.
In organic chemistry laboratory, diazomethane has two common uses.
1. Conversion of carboxylic acids to methyl esters
2. Conversion of alkenes to cyclopropanes
see also diazonium ion