Sodium hydroxide can be prepared by reacting calcium hydroxide with sodium carbonate (Gossage Process); from sodium chloride by electrolysis; or sodium metal and water vapour at low temperature.
In the laboratory, sodium hydroxide may be purified from sodium salts by dissolving it in alcohol. The salt itself does not dissolve but any organic contaminant can be removed by evaporating off the alcohol. Ordinary solid sodium hydroxide always contains sodium carbonate (see below). However, if it is dissolve in an equal valume of carbon dioxide-free water, the carbonate remains insoluble and can be filtered off through glass wool.