Hard water can be softened by the following methods depending upon the nature of hardness.
(a) Temporary hardness :
1. By boiling. It can be removed by merely boiling the water. Boiling decomposes the bicarbonates to give carbon dioxide and insoluble carbonates, which can be removed by filtration.

2. Clark’s process : Temporary hardness can be removed, by the addition of a calculated amount of lime, where magnesium carbonate or calcium carbonate is precipitated.
Ca(HCO3)2 + Ca(OH)2 → 2CaCO3 + 2H2O
Mg(HCO3)2 + Ca(OH)2 → CaCO3 + MgCO3 + 2H2O
(b) Permanent hardness: With sodium carbonate. On treatment with washing soda, Ca2+ and Mg2+ in hard water are precipitated. The precipitate of the insoluble carbonates thus formed is removed by filtration.

The anion may remain in solution but in this form it is not dangerous.
(ii) Ion-exchange method. The common substances used for this process is zeolite which is hydrated sodium aluminium silicate, NaAl(SiO2)2. The exchange occurs when on passing over the zeolite bed, sodium ions from zeolite are replaced by calcium and magnesium ions.
Thus .
2NaZe + Ca2+ → (Ze)2Ca + 2Na+ ;
2NaZe + Mg2+ → (Ze)2Mg + 2Na+
When all the sodium ions of zeolite has been replace, the zeolite is said to be exhausted. It can be regenerated by treatment with strong solution of sodium chloride.
2Na + (Ze)2 Ca → 2ZeNa + Ca2+