Magnesium sulfate is an inorganic salt containing magnesium , sulfur and oxygen , with the formula MgSO 4 . It is a white powder, commonly known as epsom salts. It is easily dissolved in water, making it a source of magnesium that can be readily absorbed by living things.