Magnesium oxalate is an inorganic compound comprising a magnesium cation with a 2+ charge bonded to an oxalate anion. It has the chemical formula MgC2O4. Magnesium oxalate is a white solid that comes in two forms: an anhydrous form and a dihydrate form where two water molecules are complexed with the structure.