Sodium bicarbonate is used in a water treatment method to soften water (removing calcium and magnesium impurities from it). The process uses a chemical reaction to convert the calcium hydroxide (or magnesium hydroxide) into calcium carbonate, which isn't water soluble. Softened water usually has elevated levels of dissolved sodium in it compared to standard tap water, which is a health concern.
Sodium bicarbonate is introduced into a filter that water circulates through. The reaction strips dissolved calcium hydroxide out of the water, where the calcium hydroxyl group bonds to the two carbon atoms in sodium bicarbonate, making calcium carbonate and a free sodium ion. The calcium carbonate is then precipitated out of the water flow and stored. A similar reaction also strips out magnesium ions in the water. Because of the nature of the chemical reaction, this method of water softening is less effective when the calcium or magnesium is bonded to sulfur compounds rather than hydroxyl groups.