Electrolysis

Electrolysis is a decomposition of a liquid by passing a direct electric current through it. The first laboratory electrolysis of H2O to H2 and O2, was performed in 1800, and the process is still used today to produce these gases at a high level of purity.

Sodium hydroxide
Sodium hydroxide is produced commercially by electrolysis, sending a direct current through an aqueous solution of sodium chloride. Hydrogen gas is released at the negative pole and chlorine gas is released at the positive pole. At the end of the electrolysis, the solution contains sodium hydroxide. The process is illustrated above:

2NaCl(aq) + 2H2O(l) -(electrolysis)-> H2(g) + Cl2(g) + 2NaOH(aq)