Although magnesium carbonate is ordinarily obtained by mining the mineral magnesite, the trihydrate salt, MgCO3·3H2O, can be prepared by mixing solutions of magnesium and carbonate ions under an atmosphere of carbon dioxide. Magnesium carbonate can also be synthesized by exposing a magnesium hydroxide slurry to carbon dioxide under pressure (3.5 to 5 atm) below 50 °C, which gives soluble magnesium bicarbonate:
Mg(OH)2 + 2 CO2 → Mg(HCO3)2
Following the filtration of the solution, the filtrate is dried under vacuum to produce magnesium carbonate as a hydrated salt:
Mg2+ + 2 HCO3- → MgCO3 + CO2 + H2O
When dissolved with acid, magnesium carbonate decomposes with release of carbon dioxide:
MgCO3 + 2 HCl → MgCl2 + CO2 + H2O
MgCO3 + H2SO4 → MgSO4 + CO2 + H2O
At high temperatures, MgCO3 decomposes to magnesium oxide and carbon dioxide, this process is called calcining:
MgCO3 → MgO + CO2