Magnesium can help with gastritis, but the benefit depends on which form you take and why you’re taking it. Magnesium-based antacids directly neutralize stomach acid and reduce the activity of pepsin, an enzyme that can damage inflamed stomach lining. Magnesium supplements taken for general health, on the other hand, can sometimes make gastritis symptoms worse if you choose the wrong form or take too much.
How Magnesium Antacids Help Gastritis
Magnesium carbonate and magnesium hydroxide are the forms found in over-the-counter antacids. When these compounds reach your stomach, they react with hydrochloric acid to form water and harmless mineral salts, raising the pH and giving inflamed tissue a break from acid exposure. In lab testing, a calcium/magnesium carbonate antacid raised stomach pH to 3.0 within 40 seconds and reached a peak of 5.24, holding that level for nearly 10 minutes. During that window, pepsin activity dropped significantly. Both calcium carbonate and magnesium carbonate showed about 82% anti-peptic activity in the same testing.
Beyond simple acid neutralization, magnesium-containing antacids appear to support healing through several additional pathways: promoting blood vessel growth in damaged tissue, binding bile acids that irritate the stomach lining, and suppressing the growth of H. pylori, the bacterium responsible for many cases of chronic gastritis.
The H. pylori Connection
If your gastritis is caused by H. pylori, magnesium levels may be part of the picture. Research published in The Eurasian Journal of Medicine found that children with active H. pylori infections had significantly lower blood magnesium levels than healthy controls. H. pylori actually relies on magnesium to survive in the stomach, pulling it from surrounding cells through a specialized transport protein called CorA. Without access to magnesium, the bacterium cannot grow in lab conditions.
This doesn’t mean taking magnesium will cure an H. pylori infection. Standard treatment still requires antibiotics. But restoring magnesium balance after eradication therapy may help the stomach lining recover, and the infection itself may be partly responsible for depleting your magnesium stores in the first place.
PPI Use and Magnesium Depletion
Many people with gastritis take proton pump inhibitors (PPIs) to control acid production. If you’ve been on a PPI for more than a few months, magnesium supplementation becomes especially relevant. The FDA issued a safety communication warning that long-term PPI use, typically longer than one year, can cause dangerously low magnesium levels. The exact mechanism isn’t fully understood, but it likely involves changes in how the intestines absorb magnesium.
In about one quarter of the cases the FDA reviewed, taking magnesium supplements alone wasn’t enough to correct the deficiency. The PPI itself had to be stopped before levels returned to normal. If you’ve been on a PPI for gastritis and experience muscle cramps, fatigue, or irregular heartbeat, low magnesium is worth investigating with a blood test.
Choosing the Right Form
Not all magnesium supplements are equally friendly to an irritated stomach. The form you pick matters a lot when gastritis is already causing discomfort.
- Magnesium glycinate is generally the best choice for sensitive stomachs. It’s a chelated form, meaning the magnesium is bonded to an amino acid, which improves absorption and makes digestive side effects less likely. It rarely causes diarrhea.
- Magnesium citrate is well absorbed but has a notable laxative effect. If you’re already dealing with nausea or loose stools from gastritis, this form can make things worse.
- Magnesium oxide is cheap and widely available, but your body absorbs it less efficiently. It’s more likely to cause stomach cramps and diarrhea, which is the opposite of what you want during a flare.
- Magnesium carbonate and magnesium hydroxide are the forms used in antacid tablets. These are designed specifically to neutralize acid and are fine for short-term symptom relief, but they aren’t ideal as daily magnesium supplements.
Dosage and Upper Limits
The recommended daily intake of magnesium for adults ranges from 310 to 420 mg depending on age and sex. For men over 30, the target is 420 mg per day. For women over 30, it’s 320 mg. These numbers include magnesium from all sources: food, drinks, and supplements combined.
The tolerable upper limit for supplemental magnesium (meaning from pills, not food) is 350 mg per day for all adults. That ceiling exists because higher supplemental doses commonly cause nausea, diarrhea, and stomach cramps, all of which can aggravate gastritis. Magnesium from food carries no upper limit because the body handles it more gradually.
Potential Side Effects on the Stomach
The irony of magnesium supplementation for gastritis is that the most common side effects hit the digestive system. High doses can cause loose stools, cramping, and nausea. Animal research on long-term magnesium glycinate use found that while acute doses helped with nausea and constipation, prolonged supplementation at higher levels eventually caused the same symptoms it was meant to relieve: bloating, nausea, and vomiting. This appears related to magnesium’s effect on smooth muscle relaxation in the gut.
Starting with a low dose, around 100 to 200 mg of supplemental magnesium, and taking it with food can reduce the chance of stomach upset. Increasing gradually gives your digestive system time to adjust.
Who Should Be Cautious
People with chronic kidney disease need to be particularly careful with magnesium supplements. Healthy kidneys regulate magnesium levels by adjusting how much gets excreted in urine. When kidney function drops below a certain threshold (a filtration rate under 10 mL/min), this compensatory mechanism fails and magnesium can accumulate to dangerous levels. Severe excess magnesium causes heart rhythm abnormalities, muscle weakness, and neurological problems.
People with gastrointestinal conditions that cause chronic diarrhea or fat malabsorption, such as Crohn’s disease or celiac disease, face the opposite problem. They tend to lose magnesium faster than they can replace it and may need higher intake or a more absorbable form like magnesium glycinate to maintain adequate levels.

