Diazomethane is prepared by hydrolysis of an ethereal solution of an N-methyl nitrosamide with aqueous base. The traditional precursor is N-nitroso-N-methylurea, but this compound is itself somewhat unstable, and nowadays compounds such as N-methyl-N-nitro-N-nitrosoguanidine (MNNG) and N-methyl-N-nitroso-p'-toluenesulfonamide (Diazald) are preferred.
CHN reacts with basic solutions of DO to give the deuterated derivative CDN.
The concentration of CHN can be determined in either of two convenient ways.  It can be treated with an excess of benzoic acid in cold EtO. Unreacted benzoic acid is then back-titrated with standard NaOH.  Alternatively, the concentration of CHN in EtO can be determined spectrophotometrically at 410 nm where its extinction coefficient, ε, is 7.2.
The gas-phase concentration of diazomethane can be determined using photoacoustic spectroscopy.