Magnesium (Mg) and water

Magnesium (Mg) and water: occurrence, hardness and treatment

Magnesium is a naturally occurring dissolved mineral in fresh water and seawater. Together with calcium, magnesium ions (Mg2+) contribute to water hardness. This page distinguishes dissolved magnesium in water from magnesium metal, which behaves very differently.

A beaker with a magnesium strip reacting in water beside water-treatment equipment and a tablet displaying the magnesium–water equation.
Illustration of magnesium metal reacting with water and water-treatment equipment.

How does magnesium react with water?

Magnesium metal reacts very slowly with cold liquid water because a surface layer limits further reaction. The reaction is faster with hot water. Magnesium reacts with liquid water to form magnesium hydroxide and hydrogen gas:

Mg(s) + 2 H2O(l) → Mg(OH)2(s) + H2(g)

With steam, magnesium forms magnesium oxide and hydrogen:

Mg(s) + H2O(g) → MgO(s) + H2(g)

These reactions describe elemental magnesium, not the dissolved Mg2+ normally measured in natural water. Magnesium metal fires are a separate hazard: water, foam and carbon dioxide are unsuitable extinguishing agents. Fire response should be left to trained responders using appropriate agents.

Why is magnesium present in water?

Weathering and dissolution of magnesium-bearing rocks and minerals, including dolomite and magnesite, release magnesium into groundwater and surface water. Concentrations vary with local geology, water chemistry and contact time. Saline waters and some industrial discharges can also contain elevated magnesium.

In water, magnesium is mainly present as dissolved Mg2+. Its concentration and chemical form depend on pH, alkalinity and the other dissolved ions present.

Magnesium carbonate, magnesium sulfate and seawater

Magnesium occurs in rocks and minerals in several forms. Magnesite is magnesium carbonate (MgCO3), and dolomite contains both calcium and magnesium carbonate. These minerals can release magnesium as they weather, although magnesite is only sparingly soluble and its dissolution depends on water chemistry.

Magnesium sulfate (MgSO4) occurs naturally in seawater and mineral springs, as well as in hydrated minerals such as epsomite. Magnesium sulfate minerals are soluble, so their dissolution can add both magnesium and sulfate to water. In seawater, however, these substances are mainly discussed as dissolved Mg2+ and SO42− ions; a portion of the ions forms dissolved ion pairs, so they are not all present as intact MgSO4 molecules.

As a reference composition, seawater at a salinity of about 35 contains approximately 1.294 g of magnesium per kilogram of water (about 1,294 mg/kg). The actual concentration varies with salinity and location. Magnesium is one of seawater’s major dissolved ions.

Magnesium, water hardness and scale

Water hardness is caused mainly by dissolved calcium and magnesium. It is commonly reported as milligrams per litre of calcium carbonate equivalent (mg/L as CaCO3). Hard water can reduce soap lather and contribute to mineral deposits in pipes, heaters and other equipment. The amount and type of scale depend on the full water chemistry and operating conditions; magnesium alone does not determine whether scaling will occur.

Environmental and health considerations

Magnesium is an essential nutrient for plants and animals; in plants, it is part of the chlorophyll molecule. Its environmental effects depend on concentration, exposure and the chemistry of the receiving water. The presence of magnesium by itself does not indicate that water is harmful or beneficial.

Magnesium is also an essential nutrient for people, and drinking water can contribute to dietary intake. The World Health Organization has reviewed evidence on magnesium and calcium in drinking water, including their contribution to intake and possible health associations. Very high magnesium concentrations, particularly when accompanied by high sulfate, may have a laxative effect. Medical conditions and magnesium-containing medicines or supplements can also affect how the body handles magnesium; this page is not medical advice.

How can magnesium be reduced in water?

Magnesium is reduced when the treatment objective is to lower water hardness or dissolved mineral content. The suitable process depends on the source water, the required product-water quality and operating conditions.

  • Cation-exchange softening: replaces dissolved calcium and magnesium ions with other ions, commonly sodium, to reduce hardness.
  • Lime softening: at suitable pH and process conditions, magnesium can be precipitated as magnesium hydroxide and removed with the treatment solids.
  • Reverse osmosis: can reduce dissolved salts, including magnesium, while producing a concentrate stream that must be managed appropriately.

Read more about water softening, ion exchange and reverse osmosis.

For examples of common magnesium salts, where they occur in water and treatment options, see common magnesium salts in aqueous solutions and their removal/purification technologies.

Last reviewed: 3 November 2026 by Lenntech.

Sources and further reading

Read more about elements and their interaction with water.