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 (NCHCOOEt). 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.