Sodium hydroxide is produced commercially through the electrolysis of brine using diaphragm, mercury cathode, or membrane cells. Diaphragm cells produce a dilute sodium hydroxide solution requiring further concentration, while mercury cells produce a pure concentrated solution. Membrane cells avoid mercury usage but require very pure brine and membranes have high costs and short lifetimes. The electrolysis separates sodium ions at the cathode to form sodium hydroxide and chlorine gas at the anode.