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
eg:
mechanism:
2. Conversion of alkenes to cyclopropanes
eg:
mechanism:
see also diazonium ion