On this page
Most aldehydes meet ammonia and stop at a small product. Formaldehyde keeps going until ten molecules have locked into one symmetric cage. That cage is hexamethylenetetramine, also called urotropine. Knowing why it forms is a good test of whether you understand carbonyl chemistry or have only memorised it.
What is the product when formaldehyde reacts with ammonia?
The overall equation is 6 HCHO + 4 NH3 → (CH2)6N4 + 6 H2O.
Hexamethylenetetramine has the formula C6H12N4, the systematic name 1,3,5,7-tetrazatricyclo[3.3.1.1³,⁷]decane, and two other common names, urotropine and methenamine (PubChem). Aleksandr Butlerov discovered it in 1859, and it is still made industrially by combining formaldehyde and ammonia (Wikipedia).
The reaction is easy to run. The Kirk-Othmer Encyclopedia of Chemical Technology, quoted on PubChem, says that when aqueous formaldehyde is treated with ammonia 'the reaction is fast and essentially quantitative', and Ullmann's Encyclopedia of Industrial Chemistry, quoted on the same page, reports yields near 90% for the usual water-based process.
Four nitrogen atoms sit at the corners of a tetrahedron and are linked by CH2 groups, giving a cage like adamantane (Wikipedia). A tetrahedron has six edges, so there are six CH2 bridges, and every nitrogen is bonded to three carbons. There is no C=O, no C=N and no N-H left anywhere in the molecule.
How does formaldehyde turn into a cage, step by step?
Start from the general rule in the NCERT Class 12 chapter on aldehydes and ketones: ammonia and its derivatives H2N-Z add to the carbonyl group, the reaction is reversible and catalysed by acid, and the addition product loses water to form >C=N-Z; with Z = H the product is an imine (NCERT Class 12 Chemistry, Unit 8). For formaldehyde, follow that rule and then keep counting:
Addition: HCHO + NH3 → H2N-CH2-OH, the carbinolamine (aminomethanol).
Loss of water: H2N-CH2-OH → CH2=NH + H2O. This is methanimine, the simplest imine.
Ring formation: 3 CH2=NH → (CH2NH)3, hexahydro-1,3,5-triazine, a six-membered ring of three carbons and three nitrogens. This ring has been detected as an intermediate in the formaldehyde-ammonia condensation, but the reaction continues to hexamethylenetetramine (Wikipedia).
Closing the cage: (CH2NH)3 + 3 HCHO + NH3 → C6H12N4 + 3 H2O. Three more CH2 bridges tie the three ring N-H groups to one new nitrogen.
Add steps 1 to 4 (three times for the first three) and you get back 6 HCHO + 4 NH3 → C6H12N4 + 6 H2O. Treat step 4 as atom bookkeeping rather than a full mechanism; what an examiner wants is the intermediates and the final cage.
Why don't other aldehydes form a cage like urotropine?
With ammonia, other aldehydes also condense, and the triazine ring forms from them too: 3 RCHO + 3 NH3 → (RCHNH)3 + 3 H2O (Wikipedia). The difference is what sits on each ring carbon. In (RCHNH)3 every carbon carries an R group; in the formaldehyde ring every carbon carries only hydrogen.
NCERT explains why aldehydes react faster than ketones: bulky groups hinder the approaching nucleophile, and alkyl groups make the carbonyl carbon less electrophilic (NCERT). Formaldehyde, with no alkyl group at all, is the extreme case, and that is a sensible way to remember why its ring keeps reacting until no N-H is left. Our explainer on why aldehydes are more reactive than ketones covers the same argument, and the post on carbonyls with ammonia derivatives such as oximes and hydrazones lists the other condensation products you should know.
Worked example: how do you check the equation in an exam?
Count atoms on both sides of 6 HCHO + 4 NH3 → C6H12N4 + 6 H2O:
Carbon: 6 on the left, 6 in the cage.
Hydrogen: 12 from formaldehyde plus 12 from ammonia make 24; the cage has 12 and six waters have 12.
Nitrogen: 4 and 4.
Oxygen: 6 in formaldehyde, all 6 leave as water.
Then run three quick checks before marking an option:
Is there any oxygen in the product? If an option shows C=O or C-OH in urotropine, reject it.
Is the ratio 6:4 (3:2)? A 1:1 ratio describes the triazine ring, not the cage.
Does every nitrogen have three carbons? If a structure shows N-H, it is an intermediate.
If you can balance this but still mix up which aldehyde gives which product, the Fermi Problem Library has worked problems with a step-by-step solver that explains the reasoning rather than printing an answer. For nucleophilic addition itself, the Fermi Concept Library gives each concept its own lesson and its place in the map.
Where is urotropine used?
Its crystal structure was published in 1923 by Roscoe Dickinson and Albert Raymond (Journal of the American Chemical Society). Today PubChem lists it as a curing agent for phenol-formaldehyde and urea-formaldehyde resins, as fuel tablets for camping stoves, and, under the name methenamine, as a medicine; questions about the medicine belong with a doctor. Both starting chemicals are hazardous, so this is a reaction for the textbook, not the kitchen.
Formaldehyde has another habit worth pairing with this one: read why formaldehyde is always oxidised in a crossed Cannizzaro reaction next.



