Primary aromatic amines react with nitrous acid to yield arene diazonium salts.
ArNH2+NaNO2
1°Aromatic amine
+2HX
cold
⟶
Ar−N=N+X−
Arenediazonium salt
+NaX+2H2O
The diazonium group can be replaced by fluorine by treating the diazonium salt with fluoroboric acid (HBF4). The precipitated diazonium fluoroborate is isolated, dried and heated until decomposition occurs to yield the aryl fluoride. This reaction is known as Balz-Schiemann reaction.