Magnesium chloride is an inorganic compound with the formula . It forms hydrates , where n can range from 1 to 12. These salts are colorless or white solids that are highly soluble in water. These compounds and their solutions, both of which occur in nature, have a variety of practical uses. Anhydrous magnesium chloride is the principal precursor to magnesium metal, which is produced on a large scale. Hydrated magnesium chloride is the form most readily available.
Magnesium chloride can be extracted from brine or sea water. In North America, it is produced primarily from Great Salt Lake brine. In the Jordan Valley, it is obtained from the Dead Sea. The mineral bischofite () is extracted (by solution mining) out of ancient seabeds, for example, the Zechstein seabed in northwest Europe. Some deposits result from high content of magnesium chloride in the primordial ocean. Some magnesium chloride is made from evaporation of seawater.
In the Dow process, magnesium chloride is regenerated from magnesium hydroxide using hydrochloric acid:
It can also be prepared from magnesium carbonate by a similar reaction.
crystallizes in the cadmium chloride motif, which features octahedral Mg centers. Several hydrates are known with the formula , and each loses water upon heating: n = 12 (−16.4 °C), 8 (−3.4 °C), 6 (116.7 °C), 4 (181 °C), 2 (about 300 °C). In the hexahydrate, the is also octahedral, but is coordinated to six water ligands. The thermal dehydration of the hydrates (n = 6, 12) does not occur straightforwardly. Anhydrous is produced industrially by heating the complex salt named hexamminemagnesium dichloride .
As suggested by the existence of hydrates, anhydrous is a Lewis acid, although a weak one. One derivative is tetraethylammonium tetrachloromagnesate . The adduct is another. In the coordination polymer with the formula , Mg adopts an octahedral geometry. The Lewis acidity of magnesium chloride is reflected in its deliquescence, meaning that it attracts moisture from the air to the extent that the solid turns into a liquid.