Magnesium sulfate is an inorganic salt (chemical compound) containing magnesium, sulfur and oxygen, with the formula MgSO4. It is often encountered as the heptahydrate sulfate mineral epsomite (MgSO4·7H2O), commonly called Epsom salt, taking its name from a bitter saline spring in Epsom in Surrey