Nessler reagent is a solution of potassium mercuric iodide (K2HgI4). When it is added to a solution containing ammonia, the following reaction occurs:
2NH3 + K2HgI4 + 3KOH → Hg(NH2)2I + 2KI + 3H2O
The yellow-orange color of the solution is due to the formation of the Hg(NH2)2I complex. The intensity of the color is proportional to the concentration of ammonia in the gas.
The Nessler reagent test is a simple and inexpensive test for ammonia gas. It is often used in industrial settings to monitor the levels of ammonia in the air.