A small amount of the compound is fused with metallic sodium. The halogen present in the compound combines with sodium to form sodium halide which passes into the sodium extract.
X+Na⟶NaX
A part of the Lassaigne’s extract is boiled with dilute nitric acid to expel all the gases if evolved. The silver nitrate solution is added to the resulting solution.
If any of the halogen is present, a precipitate is formed.