Nitrite is detected and analyzed by the formation of a red pink colour upon treatment of a nitrite-containing sample with the Griess reagent, which consists of two components in an acidic solution: an aniline derivative and a coupling agent. The most common arrangements use sulfanilamide and N-(1-naphthyl)ethylenediamine: a typical commercial Griess reagent contains 0.2% N-(1-naphthyl)ethylenediamine dihydrochloride, and 2% sulfanilamide in 5% phosphoric acid. This diamine is used in place of the simpler and cheaper 1-naphthylamine because the latter is a potent carcinogen and moreover the diamine forms a more polar and hence a much more soluble dye in acidic aqueous medium. Other aniline derivatives that have been used include sulfanilic acid, nitroaniline, and p-aminoacetophenone.
The Griess test involves two subsequent reactions. When sulfanilamide is added, the nitrite ion reacts with it in the Griess diazotization reaction to form a diazonium salt, which then reacts with N-(1-naphthyl)ethylenediamine in an azo coupling reaction, forming a pink-red azo dye. 
Using a spectrophotometer, it is possible to quantitatively determine the nitrite concentration. The detection limit of the Griess test generally ranges between 0.02 and 2 μM, depending on the exact details of the specific components used in the Griess reagent.