Magnesium in well water is one half of hardness, the other being calcium, and it arrives naturally as groundwater moves through dolomite and other magnesium-bearing rock. It is not a health contaminant at household levels. It is the reason your soap will not lather, your kettle furs and your water heater loses efficiency.
Where it comes from and how it is reported
The USGS defines hardness as dissolved calcium and magnesium, expressed as calcium carbonate: soft up to 60 mg/L, moderately hard 61 to 120, hard 121 to 180 and very hard above that. Most laboratory reports give you a single hardness figure rather than splitting calcium and magnesium apart, and for treatment decisions that combined number is what matters. Wells in limestone and dolomite country sit at the harder end almost as a rule.
What it does around the house
Dissolved magnesium and calcium precipitate as scale when water is heated or evaporates. That means deposits inside the water heater, on heating elements, in the coffee maker and around the aerators and shower heads. They also react with soap to form the residue that leaves glassware spotted, laundry stiff and skin feeling filmy. None of it is dangerous, and all of it costs money slowly through appliance life and detergent use.
Taste, health and the bitter edge
Magnesium salts have a slightly bitter taste that some people notice at higher levels, and a well with high magnesium can taste distinctly different from a soft municipal supply. Drinking water is a minor contributor to dietary magnesium next to food. Treat it as an aesthetic and plumbing question rather than a health one, and reserve your health testing budget for the things that genuinely warrant it on a well: bacteria, nitrate, arsenic and lead.
Treating it, and the well-specific complication
Ion exchange softening is the standard answer: resin swaps sodium or potassium for the calcium and magnesium, and regenerates with brine. On a well, iron is the complication. Penn State Extension notes that softeners can remove dissolved iron when the pH is above 6.7, hardness is between 3 and 20 grains per gallon and dissolved iron is under 5 mg/L, and that oxidized iron fouls resin. So test iron and pH before sizing a softener, and put an iron filter ahead of it where the numbers call for one. Our well water testing guide covers the panel.
Questions people ask about magnesium in well water
Is magnesium in well water bad for you?
No. At household levels it is a nuisance mineral rather than a health risk, and it is not regulated as a contaminant in drinking water.
Does a water softener remove magnesium?
Yes. Ion exchange removes both calcium and magnesium, which is exactly what makes the water soft.
Should I test for magnesium separately?
Usually not. A combined hardness figure, plus iron, manganese and pH, gives you everything needed to size and protect a softener.