2,4-Dinitrophenylhydrazine can be used to qualitatively detect the carbonyl functionality of a ketone or aldehyde functional group.
A positive test is signalled by the formation of a yellow, orange or red precipitate (known as a dinitrophenylhydrazone).
 If the carbonyl compound is aromatic, then the precipitate will be red; if aliphatic, then the precipitate will have a more yellow color.
The reaction between 2,4-dinitrophenylhydrazine and a generic ketone to form a hydrazone is shown below:
RR'C=O   +   C₆H₃(NO₂)₂NHNH₂   →   C₆H₃(NO₂)₂NHN=CRR'   +   H₂O
This reaction is, overall, a condensation reaction as two molecules joining together with loss of water.
 Mechanistically, it is an example of addition-elimination reaction: nucleophilic addition of the -NH₂ group to the C=O carbonyl group, followed by the elimination of a H₂O molecule:
Crystals of different hydrazones have characteristic melting and boiling points, allowing the identity of a substance to be determined in a method known as derivatization.
In particular, the use of 2,4-dinitrophenylhydrazine was developed by Brady and Elsmie.
Modern spectroscopic and spectrometric techniques have superseded these techniques.

Dinitrophenylhydrazine does not react with other carbonyl-containing functional groups such as carboxylic acids, amides, and esters, for which there is resonance-associated stability as a lone-pair of electrons interacts with the p orbital of the carbonyl carbon resulting in increased delocalization in the molecule.
This stability would be lost by addition of a reagent to the carbonyl group.
Hence, these compounds are more resistant to addition reactions.
Also, with carboxylic acids, there is the effect of the compound acting as a base, leaving the resulting carboxylate negatively charged and hence no longer vulnerable to nucleophilic attack.
2,4-Dinitrophenylhydrazine can be used to qualitatively detect the carbonyl functionality of a ketone or aldehyde functional group. A positive test is signalled by the formation of a yellow, orange or red precipitate (known as a dinitrophenylhydrazone).  If the carbonyl compound is aromatic, then the precipitate will be red; if aliphatic, then the precipitate will have a more yellow color. The reaction between 2,4-dinitrophenylhydrazine and a generic ketone to form a hydrazone is shown below:
RR'C=O   +   C₆H₃(NO₂)₂NHNH₂   →   C₆H₃(NO₂)₂NHN=CRR'   +   H₂O
This reaction is, overall, a condensation reaction as two molecules joining together with loss of water.  Mechanistically, it is an example of addition-elimination reaction: nucleophilic addition of the -NH₂ group to the C=O carbonyl group, followed by the elimination of a H₂O molecule:
Crystals of different hydrazones have characteristic melting and boiling points, allowing the identity of a substance to be determined in a method known as derivatization. In particular, the use of 2,4-dinitrophenylhydrazine was developed by Brady and Elsmie. Modern spectroscopic and spectrometric techniques have superseded these techniques.
Dinitrophenylhydrazine does not react with other carbonyl-containing functional groups such as carboxylic acids, amides, and esters, for which there is resonance-associated stability as a lone-pair of electrons interacts with the p orbital of the carbonyl carbon resulting in increased delocalization in the molecule. This stability would be lost by addition of a reagent to the carbonyl group. Hence, these compounds are more resistant to addition reactions. Also, with carboxylic acids, there is the effect of the compound acting as a base, leaving the resulting carboxylate negatively charged and hence no longer vulnerable to nucleophilic attack.
2,4-Dinitrophenylhydrazine