Supplements and acid reducers: omeprazole, vitamin B12 and magnesium

By VitOptics Staff

Do acid reducers like omeprazole affect vitamin B12, magnesium or iron?

Short answer: The prescribing information for omeprazole (Prilosec) and pantoprazole (Protonix) says that daily, long-term use of acid-reducing medicine may lead to poor absorption of vitamin B12, and that low magnesium has been reported rarely after at least three months of use, most often after a year. Iron supplements are also listed as interacting with these medicines. If you take an acid reducer regularly, ask your prescriber or pharmacist how this applies to you before choosing a supplement. Do not stop or change your medicine without talking to them.

This guide sets out what the labels and MedlinePlus actually say, which nutrients come up, and what to ask at your next appointment or refill.

PPI, H2 blocker or antacid: know which one you take

"Acid reducer" covers three different kinds of product, and the labels say different things about each:

  • Proton pump inhibitors (PPIs), such as omeprazole (Prilosec), esomeprazole (Nexium) and pantoprazole (Protonix). Omeprazole is sold both by prescription and over the counter.
  • H2 blockers, such as famotidine (Pepcid). MedlinePlus explains that famotidine works by decreasing the amount of acid made in the stomach.
  • Antacids, used to relieve heartburn and acid indigestion. Some contain calcium or magnesium.

Check the active ingredient on your box or prescription label. The rest of this article depends on which one it is and how long you have been taking it.

Vitamin B12 and long-term acid reducers

Vitamin B12 helps the body form red blood cells and maintain the nervous system, according to MedlinePlus. Food sources include fish, meat, poultry, eggs, milk and fortified breakfast cereals.

Absorbing B12 from food depends partly on the stomach. The Prilosec prescribing information says: "Daily treatment with any acid-suppressing medications over a long period of time (e.g., longer than 3 years) may lead to malabsorption of cyanocobalamin (vitamin B-12) caused by hypo- or achlorhydria." Cyanocobalamin is a form of B12, and hypo- or achlorhydria means low or absent stomach acid. The label adds that reports of actual B12 deficiency with acid-suppressing therapy are rare. The Protonix label carries the same warning in nearly identical words.

Note the words "any acid-suppressing medications". This sentence is not limited to PPIs. MedlinePlus also lists "taking antacids and other heartburn medicines for a long period of time" among the causes of vitamin B12 deficiency anemia.

NIH's Office of Dietary Supplements lists omeprazole (Prilosec), lansoprazole (Prevacid) and cimetidine (Tagamet) among the gastric acid inhibitors that can interfere with vitamin B12 absorption from food.

Research points the same way. In a study of Kaiser Permanente Northern California members published in JAMA in 2013, researchers compared 25,956 people newly diagnosed with vitamin B12 deficiency against 184,199 people without it. A supply of two years or more of a PPI, or of an H2 blocker without any PPI use, was associated with a higher chance of vitamin B12 deficiency. The study shows an association across a large group. It does not show that any one person's medicine will lower their B12.

Metformin is another medicine linked to lower B12; our article on metformin and vitamin B12 covers it. If you take both, mention both when you talk about testing.

The Protonix Medication Guide lists symptoms of low B12 to tell your doctor about, including "shortness of breath, lightheadedness, irregular heartbeat, muscle weakness, pale skin, feeling tired, mood changes, and tingling or numbness in the arms and legs." Some people have no symptoms at all, which is one reason to ask about a vitamin B12 blood test rather than guess.

Magnesium: what the PPI labels report

Magnesium helps maintain normal muscle and nerve function and is needed for the heart to function normally, according to MedlinePlus.

The Prilosec label (section 5.9) and the Protonix label (section 5.8) both say that low magnesium (hypomagnesemia) "has been reported rarely in patients treated with PPIs for at least three months," in most cases after a year of treatment. They add that low magnesium may lead to low calcium or low potassium. Both labels describe how it was handled: "In most patients, treatment of hypomagnesemia required magnesium replacement and discontinuation of the PPI." That is a decision for your prescriber, based on your blood tests, and not something to work out with a supplement on your own.

The labels also say prescribers may consider checking magnesium levels before and during treatment for people expected to take a PPI for a long time, or who take it with digoxin or with medicines that may lower magnesium, such as diuretics. MedlinePlus's page on the magnesium blood test lists "proton pump inhibitors for acid reflux" and diuretics among the medicines that can be behind a low result.

NIH's Office of Dietary Supplements says the same in consumer terms: prescription drugs used to ease acid reflux or treat peptic ulcers "can cause low blood levels of magnesium when taken over a long period of time."

The Protonix Medication Guide tells patients: "Tell your doctor if you have symptoms of low magnesium levels, including seizures, dizziness, irregular heartbeat, jitteriness, muscle aches or weakness, and spasms of hands, feet or voice."

Separately, MedlinePlus's omeprazole page says to call your doctor immediately, or get emergency medical help, if you have symptoms that include "irregular, fast, or pounding heartbeat; muscle spasms; uncontrollable shaking of a part of the body; excessive tiredness; lightheadedness; dizziness; or seizures."

These magnesium statements appear in the PPI labels. The labels cited here do not attach the same warning to famotidine or other H2 blockers.

Iron depends on stomach acid too

The Prilosec and Protonix labels list "iron salts" among the drugs that depend on stomach acid for absorption, and the Prilosec label says omeprazole "can reduce the absorption of other drugs due to its effect on reducing intragastric acidity."

NIH's Office of Dietary Supplements adds that lansoprazole (Prevacid) and omeprazole (Prilosec) decrease stomach acid, so they "might reduce the amount of nonheme iron that the body absorbs from food."

MedlinePlus lists iron supplements as nonprescription products that may interact with omeprazole, esomeprazole and pantoprazole. The omeprazole and esomeprazole pages also name St. John's wort. Each page says to let your doctor and pharmacist know if you take these. The omeprazole page adds: "Do not start any of these medications while taking omeprazole without discussing with your healthcare provider."

Antacids can be a calcium and magnesium source too

Some heartburn products are themselves minerals. MedlinePlus notes that calcium carbonate is used both as a calcium supplement and as an antacid.

If you also take a multivitamin or a mineral supplement, the same minerals can add up. Our guide shows how to count antacid calcium and magnesium alongside the rest of your labels. MedlinePlus's calcium carbonate page also says: "Do not take calcium carbonate within 1-2 hours of taking other medicines." Ask your pharmacist how that applies to your own medicines and supplements.

What to ask your prescriber or pharmacist

Useful questions include:

  • How long have I been taking this acid reducer, and how long is it meant to continue? (Bring the start date if you know it.)
  • Would a vitamin B12 or magnesium blood test make sense for me, and when were they last checked?
  • I take, or am thinking about, iron, calcium or magnesium. How should these fit with my medicine?
  • I also use an over-the-counter antacid or H2 blocker. Should that be on my medication list?

If you buy omeprazole over the counter, MedlinePlus says: "Do not take nonprescription omeprazole for longer than 14 days or treat yourself with omeprazole more often than once every 4 months without talking to your doctor." For over-the-counter famotidine, MedlinePlus says not to "take over-the-counter famotidine for longer than 2 weeks unless your doctor tells you that you should." If you have been using either one for longer than that, it is worth raising.

Bring a written list of all your prescription and nonprescription medicines, vitamins, minerals and supplements, as MedlinePlus recommends. Our guide to what to review before starting a new supplement can help you prepare.

Where VitOptics fits

VitOptics builds a personalized daily supplement pack as one pouch, from a free three-minute assessment. The free assessment asks which prescription medicines you take, along with your conditions and the supplements you already use. Automated checks review the recommendation; some profiles need additional review by a person on our team. A second automated check reads the whole pack before it is released. Your result lists every formula, the amount of each ingredient and the reason it is there, so you can compare it with what you already take and show it to your prescriber or pharmacist before you start.

A personalized vitamin pack is priced by what's in your pack: from $59 a month, the same every month, with free standard U.S. shipping. U.S. only.

Questions about your acid reducer itself, including how long to take it and whether to test your B12 or magnesium, belong with your prescriber or pharmacist.

Your medicine comes first

Every VitOptics pack is checked against the medications you enter before anything goes in, and your result explains why each item is there.

Start my free assessment.

Read more in the VitOptics learning hub.

This article is for educational purposes and is not medical advice. Supplements are not intended to diagnose, treat, cure or prevent any disease.

Prepared with AI assistance using the sources linked in this article.

Last updated: October 2026

Sources

  1. DailyMed: Prilosec (omeprazole magnesium) prescribing information and Medication Guide
  2. DailyMed: Protonix (pantoprazole sodium) prescribing information and Medication Guide
  3. MedlinePlus: Omeprazole
  4. MedlinePlus: Esomeprazole
  5. MedlinePlus: Pantoprazole
  6. MedlinePlus: Famotidine
  7. MedlinePlus: Calcium Carbonate
  8. MedlinePlus: Vitamin B12
  9. MedlinePlus: Vitamin B12 Deficiency Anemia
  10. MedlinePlus: Vitamin B12 Level
  11. MedlinePlus: Magnesium Blood Test
  12. JAMA (Lam et al., 2013): Proton pump inhibitor and histamine 2 receptor antagonist use and vitamin B12 deficiency
  13. NIH Office of Dietary Supplements: Vitamin B12 Fact Sheet for Consumers
  14. NIH Office of Dietary Supplements: Magnesium Fact Sheet for Consumers
  15. NIH Office of Dietary Supplements: Iron Fact Sheet for Consumers

VitOptics builds personalized vitamin packs, with a written reason for every pick. Take the free assessment to see your recommendation and its price before you subscribe.