Magnesite is magnesium carbonate, MgCO3. Iron (as Fe2+) substitutes for magnesium (Mg) with a complete solution series with siderite, FeCO3. Calcium, manganese, cobalt, and nickel may also occur in small amounts. Dolomite, (Mg,Ca)CO3, is almost indistinguishable from magnesite. Magnesite occurs as veins in and an alteration product of ultramafic rocks, serpentinite and other magnesium rich rock types in both contact and regional metamorphic terranes. These magnesites often are cryptocrystalline and contain silica as opal or chert.
Magnesite is also present within the regolith above ultramafic rocks as a secondary carbonate within soil and subsoil, where it is deposited as a consequence of dissolution of magnesium-bearing minerals by carbon dioxide within groundwaters.