Chlorine is manufactured industrially as a by-product in the manufacture of Caustic Soda by the electrolysis of brine.
2 NaCl + 2 H2O ==> Cl2 + H2 + 2 NaOH
This process was carried out in Kellner-Solvay Cells, using Mercury and Carbon as the electrodes. However, due to the toxicity of mercury, the modern version of the process uses metal electrodes with special membranes in the electrolytic cells.