What Should You Not Take With Magnesium? Medicines and Timing

A woman in a cream jumper fills a weekly pill organiser at a sunny kitchen table, a mug of tea, a navy notebook and a small yellow pill box beside her.

There is nothing you must never take with magnesium, but there is a short list of medicines it binds in the gut and stops being absorbed, and those need a gap of two to six hours: tetracycline and quinolone antibiotics, bisphosphonates for osteoporosis, levothyroxine for an underactive thyroid, and a few less common ones.1 The "never mix" lists online mostly confuse that timing problem with a danger that does not exist, and they add foods that make no practical difference. The real cautions are different: people with kidney disease should not take magnesium without medical advice, because they cannot excrete it; people on digoxin or with a heart rhythm condition should ask first; and two groups of medicines, acid suppressants and diuretics, lower magnesium over time and may be a reason to take it rather than avoid it.1, 2 This page sets out what to separate, what to ask about, and what to ignore.

  • Separate by two to six hours: tetracyclines and quinolones, bisphosphonates, levothyroxine, some HIV and malaria medicines, iron and zinc supplements
  • Ask your pharmacist or GP first: digoxin, heart rhythm medicines, muscle relaxants, kidney disease, myasthenia gravis
  • No interaction worth worrying about: painkillers including tramadol, antidepressants, most anti-epileptics, the pill, statins, vitamin D, tea and coffee
  • Medicines that lower your magnesium: proton pump inhibitors after a year, loop and thiazide diuretics
  • Food: nothing to avoid; high-fibre meals reduce absorption slightly and do not matter

Why magnesium interferes with some medicines

Magnesium is a positively charged mineral, and in the gut it forms insoluble complexes with certain drug molecules, so both pass through unabsorbed. The same thing happens with calcium, iron, zinc and aluminium-based antacids, which is why the lists of medicines to separate from each of them look alike. It is a timing problem: once the medicine has been absorbed, magnesium taken later does nothing to it. The second kind of interaction is pharmacological, where magnesium adds to a medicine's effect on the heart or muscles; that list is short and medical. The third is the reverse, medicines that lower magnesium, which is where the common prescriptions sit. Our hub on what magnesium is good for covers the mineral; this page is the interactions chapter.

Medicines to separate from magnesium

Tetracycline antibiotics (doxycycline, minocycline, lymecycline, often prescribed for acne and infections) and quinolone antibiotics (ciprofloxacin, levofloxacin). Magnesium can cut their absorption substantially. Take the antibiotic two hours before or four to six hours after any magnesium, calcium, iron or antacid, and for a short course it is simplest to pause the supplement.1

Bisphosphonates (alendronic acid, risedronate, ibandronate) for osteoporosis. These are poorly absorbed at the best of times and the instructions already say to take them with plain water on an empty stomach and nothing else for 30 to 60 minutes; magnesium falls under "nothing else". Take magnesium later in the day.

Levothyroxine. Magnesium, calcium and iron all reduce its absorption; keep a four-hour gap. Many people take levothyroxine first thing and magnesium in the evening, which solves it.

Some antiviral and antimalarial medicines and penicillamine, where the pharmacist will advise on spacing.

Iron and zinc supplements. Minerals compete for absorption; take them at different times of day if you need both. Calcium and magnesium are often sold together and the competition between them is modest at supplement doses.

Medicines and conditions to ask about first

Kidney disease. The kidneys excrete magnesium; with reduced function it accumulates, and high blood magnesium causes low blood pressure, a slow or irregular heartbeat, weakness and confusion.2 This is the one situation in which a magnesium supplement can be dangerous, and it includes people on dialysis and older adults with declining kidney function. Ask your renal team or GP.

Digoxin and heart rhythm medicines. Magnesium affects heart rhythm and is sometimes prescribed alongside these, sometimes not; it is a cardiologist's decision.

Muscle relaxants and some anaesthetics, whose effect magnesium can increase; tell the anaesthetist about supplements before surgery.

Myasthenia gravis, which magnesium can worsen.

Gabapentin is often listed; magnesium can reduce its absorption modestly, and a two-hour gap is sensible.

Medicines that lower your magnesium

These are the common prescriptions where the interaction runs the other way. Proton pump inhibitors (omeprazole, lansoprazole, esomeprazole) taken for a year or more reduce magnesium absorption, and the medicines regulator advises doctors to consider checking levels in long-term users, particularly those also on diuretics or digoxin. Loop and thiazide diuretics (furosemide, bendroflumethiazide, indapamide) increase urinary losses. Some chemotherapy, immunosuppressant and antifungal drugs do the same.1 If you take any of these and have cramps, twitching, tiredness or palpitations, a magnesium level is worth asking for, and a supplement may be appropriate with your prescriber's agreement. The signs of low magnesium covers the picture.

What you can take with magnesium

Tramadol and other painkillers. No established interaction. "Can I take magnesium with tramadol" is one of the most asked questions in this family; the two do not interact, and the sleep problems people report on tramadol are the medicine's own. Any question about a prescription painkiller still belongs with your pharmacist.

Antidepressants and most anti-epileptics, including lamotrigine: no established interaction. Statins, blood pressure tablets, the contraceptive pill, HRT, metformin: no interaction. Vitamin D: none; the two are often taken together and magnesium is needed to activate vitamin D, which is the grain of truth in the "take them together" advice. Vitamin B6: often paired with magnesium; keep B6 at or below 10 mg a day long term for its own reasons. Melatonin, where prescribed: no interaction.

Foods and drinks

No food needs avoiding. The "7 foods to avoid with magnesium" lists online rest on the fact that phytates in wholegrains and pulses and oxalates in spinach bind some magnesium in a meal, which slightly reduces absorption and is irrelevant to a supplement taken at another time, and those foods are themselves rich in magnesium. Tea and coffee do not block it. Alcohol in quantity depletes magnesium over time, which is a reason to drink less, not a timing rule. Taking magnesium with food is sensible because it reduces nausea and loose stools, and a meal does not meaningfully cut absorption.

Timing in practice

If you take a medicine on the list, pick a time for magnesium at the other end of the day: antibiotics or levothyroxine in the morning, magnesium with dinner. If you take several supplements, separate magnesium from iron and zinc and take it with calcium if you like. If you are on a short antibiotic course, pausing magnesium for the week is the simplest answer. Is it OK to take magnesium every day covers dose, and which magnesium is best the forms; glycinate is the one least likely to add stomach upset to the mix.

What we don't know

  • How large the gabapentin effect is in practice. Studied in small groups; a gap is precautionary.
  • How often long-term PPI users become deficient. Reported widely; prevalence varies between studies.1

Frequently asked questions

What should you never mix with magnesium?

Nothing is forbidden; tetracycline and quinolone antibiotics, bisphosphonates and levothyroxine need a two to six hour gap so they are absorbed. People with kidney disease should not take magnesium without medical advice.1, 2

Can I take magnesium if I take tramadol?

No interaction is established between the two. Ask your pharmacist if you want it confirmed against your full prescription list.

Can magnesium be taken with antibiotics or bisphosphonates?

Yes, with a gap: the antibiotic two hours before or four to six after; bisphosphonates alone with water, magnesium later in the day.

What not to eat while taking magnesium?

Nothing. High-fibre foods reduce absorption slightly and are themselves rich in magnesium. Take the supplement with food to avoid stomach upset.

When should you avoid taking magnesium?

With kidney disease, a heart rhythm condition or myasthenia gravis, unless your doctor agrees; and within a few hours of the medicines listed above.

Sources

  1. Liamis G, et al. An overview of diagnosis and management of drug-induced hypomagnesemia. Pharmacology Research and Perspectives, 2021. PubMed 34278747.
  2. Costello R, et al. Perspective: call for re-evaluation of the tolerable upper intake level for magnesium supplementation in adults. Advances in Nutrition, 2023. PubMed 37487817.
  3. NHS. Doxycycline: taking it with other medicines and supplements. nhs.uk; NHS. Levothyroxine. nhs.uk.

This article is general information, not medical advice. Your pharmacist has your full prescription list and is the right person to confirm spacing for any medicine; people with kidney disease should not take magnesium without medical advice.