Yes, proton pump inhibitors (PPIs) can sometimes cause low magnesium levels, particularly when they are used for a long time. However, this is uncommon.
If you have been prescribed a PPI, you should not stop taking it simply because you have read that it can affect magnesium. Stopping a prescribed PPI without medical advice may cause more harm than good.
PPIs such as omeprazole, lansoprazole, esomeprazole and pantoprazole are widely used to treat acid reflux, heartburn and stomach ulcers. They are also sometimes prescribed to protect the stomach from ulcers and bleeding when certain medicines increase the risk of gastrointestinal problems.
Disclaimer:Â All content on iVitamin is provided for educational purposes only. It discusses general evidence and does not constitute personalised medical advice, diagnosis or a recommendation to start, stop or alter prescribed treatment.
- How can PPIs affect magnesium?
- What are the symptoms of low magnesium?
- Who may be more likely to have low magnesium?
- Do you need a magnesium supplement if you take a PPI?
- Why are some people taking PPIs for years?
- PPIs and blood-thinning medicines
- What about PPIs and NSAIDs?
- Can you take a PPI only when needed?
- Should you stop your PPI because of magnesium?
- The bottom line
- Frequently asked questions
- Can omeprazole cause magnesium deficiency?
- How long do you have to take a PPI before it can affect magnesium?
- Should I take magnesium if I take omeprazole?
- Should I stop my PPI if I am worried about magnesium?
- Can I take a PPI only when I need it?
- Why am I taking a PPI if I don’t have heartburn?
- Do blood thinners mean I need a PPI?
- Does gastro-resistant naproxen mean I don’t need a PPI?
- What foods are high in magnesium?
- Who may need a magnesium blood test?
- References
How can PPIs affect magnesium?
Magnesium is an essential mineral involved in normal muscle and nerve function, energy metabolism and many other processes in the body.
PPIs reduce the amount of acid produced by the stomach. When they are used for a prolonged period, this can sometimes affect the absorption of magnesium from the digestive system.
In some people, this can result in hypomagnesaemia, which simply means that the level of magnesium in the blood is too low.
This is considered an uncommon side effect. The risk appears to be more relevant with prolonged PPI treatment, particularly when treatment continues for several months or longer.
It is important to put this into perspective: most people taking a PPI will not develop magnesium deficiency.
What are the symptoms of low magnesium?
Mildly low magnesium may not cause noticeable symptoms.
When magnesium levels become more significantly reduced, symptoms can include:
- Muscle cramps
- Muscle twitching or spasms
- Weakness
- Tiredness
- Dizziness
- Abnormal heart rhythms
Severe magnesium deficiency can cause more serious complications.
However, symptoms such as tiredness, weakness and muscle cramps are common and can have many different causes. Having one of these symptoms does not necessarily mean that your PPI has caused magnesium deficiency.
If you develop symptoms that concern you, speak to your GP or pharmacist. They can decide whether checking your magnesium level is appropriate.
Who may be more likely to have low magnesium?
The risk is more relevant in people taking PPIs for a prolonged period.
Your healthcare professional may be particularly mindful of magnesium levels if you also take medicines that can affect magnesium, such as diuretics, or medicines such as digoxin.
The risk may also be more relevant if you have previously had low magnesium for another reason.
This does not mean that everyone taking a PPI needs regular magnesium blood tests. Whether testing is appropriate depends on your individual circumstances.
Do you need a magnesium supplement if you take a PPI?
Not necessarily.
Taking a PPI does not automatically mean that you need a magnesium supplement.
If your magnesium level is normal, there may be no reason to take additional magnesium. Taking high-dose supplements unnecessarily can cause side effects, including diarrhoea.
If a blood test confirms that your magnesium is low, your GP or pharmacist can advise whether a supplement is appropriate and whether your medicines need reviewing.
It is also worth making sure your diet provides good sources of magnesium. These include nuts, seeds, wholegrains, wholemeal bread, beans and green leafy vegetables.
Why are some people taking PPIs for years?
PPIs are not only used to treat reflux and heartburn. Some people are prescribed them long term to protect the stomach from ulcers and gastrointestinal bleeding, particularly when they need to take medicines that can increase this risk. For example, people taking certain medicines that increase the risk of stomach ulcers or gastrointestinal bleeding may be prescribed a PPI to reduce that risk.
If you have been taking a PPI for a long time, it is worth understanding why it was prescribed and whether you still need it.
Sometimes a PPI is originally prescribed for short-term reflux or indigestion. The symptoms improve, but the medicine remains on a repeat prescription and continues to be taken every day.
In other cases, a hospital may recommend a higher dose for a short period to treat a particular problem. When treatment is transferred back to primary care, the original plan may not always be clear to the patient.
If you are taking a PPI and are unsure why you were prescribed it, it is worth asking your GP or pharmacist to review your medication.
You may still need it, or depending on why it was prescribed, you may be able to reduce the dose or take it less frequently.
PPIs and blood-thinning medicines
PPIs are sometimes prescribed alongside blood-thinning medicines to help reduce the risk of gastrointestinal bleeding in people who are considered to be at higher risk.
This may be particularly relevant in older people or those taking more than one medicine that can increase the risk of bleeding. The decision depends on the individual’s medicines and overall risk.
If you take a PPI alongside a blood-thinning medicine, don’t assume that the PPI is simply for acid reflux. It may have been prescribed specifically as stomach protection.
If you are unsure why you are taking it, ask your GP or pharmacist to review your medicines rather than stopping the PPI yourself.
What about PPIs and NSAIDs?
NSAIDs such as naproxen, ibuprofen and diclofenac can increase the risk of stomach ulcers and gastrointestinal bleeding.
A PPI may be prescribed alongside the NSAID to provide gastroprotection.
This is why you should not assume that a PPI is unnecessary simply because you are not experiencing heartburn.
It is also important to remember that gastro-resistant or enteric-coated NSAIDs do not remove the underlying gastrointestinal risks associated with NSAIDs. The effects of NSAIDs that contribute to ulcers and bleeding are not simply caused by the medicine physically touching the stomach.
Therefore, taking gastro-resistant naproxen or aspirin does not automatically mean that a PPI is unnecessary if gastroprotection has been recommended.
If the NSAID or another medicine you were originally taking has since been stopped, it is reasonable to ask your GP or pharmacist whether you still need the PPI. However, don’t stop it yourself.
Can you take a PPI only when needed?
For some people with reflux or indigestion, treatment can sometimes be reduced to the lowest effective dose, and using a PPI when symptoms occur may be appropriate.
However, this depends on why the PPI was prescribed in the first place.
Someone taking a PPI purely for occasional reflux may have different options from someone taking one to protect against gastrointestinal bleeding.
If your symptoms are well controlled and you are wondering whether you still need to take your PPI every day, speak to your GP or pharmacist. They can check whether a lower dose, less frequent treatment or stopping treatment is appropriate.
Should you stop your PPI because of magnesium?
No.
Although PPIs can sometimes cause low magnesium, this is an uncommon problem and needs to be weighed against the reason you were prescribed the medicine.
Stopping a PPI that is still needed could allow reflux, ulcers or gastrointestinal bleeding risk to return.
If you are concerned about magnesium, the better approach is to discuss it with your GP or pharmacist. They can review why you take the PPI, consider your other medicines and decide whether you need a magnesium blood test.
The bottom line
PPIs can cause magnesium deficiency, but this is uncommon and is mainly associated with prolonged treatment.
You do not need to take magnesium supplements simply because you use a PPI.
If you have been taking a PPI for a long time, develop symptoms that concern you, take medicines that can affect magnesium, or are unsure why you are still taking your PPI, speak to your GP or pharmacist.
And most importantly, do not stop a prescribed PPI simply because you have read that it can affect magnesium. Stopping it without medical advice may cause more harm than good.
Frequently asked questions
Can omeprazole cause magnesium deficiency?
Yes. Omeprazole is a PPI, and prolonged PPI treatment can sometimes cause low magnesium. However, this is uncommon and does not happen to everyone.
How long do you have to take a PPI before it can affect magnesium?
There is no exact time at which magnesium deficiency will occur. Reported cases have occurred after several months of treatment, with many involving longer-term use. The risk is generally more relevant when PPIs are taken for a prolonged period.
Should I take magnesium if I take omeprazole?
Not automatically. Taking a PPI does not mean that you need a magnesium supplement. If you are concerned about magnesium deficiency, speak to your GP or pharmacist about whether testing or supplementation is appropriate.
Should I stop my PPI if I am worried about magnesium?
No. You should not stop a prescribed PPI simply because you are concerned about magnesium. It may have been prescribed for an important reason, such as protecting your stomach from ulcers or bleeding.
Can I take a PPI only when I need it?
Some people with reflux or indigestion may be able to use a PPI less frequently or when needed, particularly once symptoms are controlled. However, this is not suitable for everyone. Speak to your GP or pharmacist before changing how you take it.
Why am I taking a PPI if I don’t have heartburn?
PPIs are not only used for reflux. They can also be prescribed to treat ulcers or protect the stomach from medicines that increase the risk of gastrointestinal ulcers or bleeding.
Do blood thinners mean I need a PPI?
Not everyone taking a blood-thinning medicine needs a PPI. However, some people at higher risk of gastrointestinal bleeding may be prescribed a PPI for stomach protection, particularly if they are older or taking more than one medicine that increases bleeding risk.
Does gastro-resistant naproxen mean I don’t need a PPI?
No, not necessarily. Gastro-resistant naproxen does not remove the underlying gastrointestinal risks associated with NSAIDs. If you have been prescribed a PPI for stomach protection, speak to your GP or pharmacist before stopping it.
What foods are high in magnesium?
Good sources of magnesium include nuts, seeds, wholegrains, wholemeal bread, beans and green leafy vegetables.
Who may need a magnesium blood test?
Magnesium testing may be considered in some people taking PPIs long term, particularly if they also take medicines such as diuretics or digoxin that can affect magnesium levels. Your GP or pharmacist can advise whether testing is appropriate for you.

