The commercial NaCl salt is purified by passing
gas through a saturated salt solution
gas through an alkaline salt solution
gas through a saturated salt solution
gas through a saturated salt solution
Saturated salt solution is filtered to remove the insoluble impurities. The filtrate is then saturated by passing HCl through it, which gives the pure salt of NaCl by common ion effect. The salts of Ca and Mg remains in the solution due to their higher solubility.