Vitamin B12 and magnesium are essential nutrients needed for energy and the health of your nervous system. It is safe to take vitamin B12 and magnesium supplements together in typical dosages.
Vitamin B12 and magnesium play a role in the creation of energy in your body:
- Vitamin B12 is needed to form healthy red blood cells, which deliver oxygen throughout the body. If you are deficient in B12, you may feel tired or lack energy.
- Magnesium plays an important role in creating cellular energy in nearly all bodily processes.
For these reasons, both vitamin B12 and magnesium are sometimes recommended as physical activity boosters or energy enhancers. However, unless you are deficient in either of these, you are unlikely to feel a significant change in energy levels.
Vitamin B12 and magnesium are needed for the development and appropriate functioning of your nervous system:
- Vitamin B12 helps to maintain a healthy nervous system. It helps send nerve signals throughout your body. It also helps protect the brain from unwanted toxins and damage. Low vitamin B12 is commonly seen in many nervous system disorders, like multiple sclerosis (MS) and nerve damage (neuropathy).
- Magnesium is necessary for signals to be transmitted throughout your nervous system. Magnesium is sometimes recommended to prevent or treat migraine headaches and to treat neuropathic (nerve) pain.
You can get vitamin B12 and magnesium through your diet, which is preferred:
- Vitamin B12 can be found in animal products, like fish, chicken, eggs, and dairy products. People who do not eat animal products may need fortified foods or supplements.
- Magnesium can be found in green leafy vegetables, whole grains, nuts, and seeds.
If you are deficient in these nutrients, talk to a healthcare provider about whether supplementation is advisable and what form and dosage is best for you.
Vitamin B12 is available as a pill, liquid, chewable tablet, or lozenge. Magnesium is available in pill and liquid form and in several forms, including magnesium oxide, magnesium citrate, and magnesium chloride.
Both vitamin B12 and magnesium are available as supplements on their own or in combination with other minerals and vitamins (such as a multivitamin).
Dosage
Dosing for vitamin B12 and magnesium varies based on the reason you are taking the supplements.
The recommended daily allowance (RDA) for vitamin B12 in adults is 2.4 micrograms. The RDA raises to 2.6 micrograms if you are pregnant and 2.8 micrograms if you are lactating.
The RDAs for magnesium are as follows:
- 19-30 year old adult males: 400 milligrams
- 19-30 year old adult females: 310 milligrams
- 19-30 year old people who are pregnant: 350 milligrams
- 19-30 year old people who are lactating: 310 milligrams
- 31-50 year old adult males: 420 milligrams
- 31-50 year old adult females: 320 milligrams
- 31-50 year old people who are pregnant: 360 milligrams
- 31-50 year old people who are lactating: 320 milligrams
- 51+ years old adult males: 420 milligrams
- 51+ years old adult females: 320 milligrams
Yes, it is safe to take vitamin B12 and magnesium together.
Vitamin B12 does not have a maximum dose that you can take. Your body naturally gets rid of extra vitamin B12 through your pee (urine).
Very high doses of magnesium can lead to side effects like low blood pressure, vomiting, tiredness, and muscle weakness. The tolerable upper limit of magnesium from supplements is 350 milligrams for adults. Doses higher than 350 milligrams raises your risk for side effects.
Potential Drug Interactions
Vitamin B12 may interact with the following medications:
- Heartburn and acid reflux drugs: Medications used to treat acid reflux and heartburn may affect how well you body absorbs vitamin B12. This can make your vitamin B12 levels low. Examples of these medications include Prilosec (omeprazole) and Pepcid (famotidine).
- Metformin: Metformin, a medication used to prevent and treat diabetes, may lower how well your body absorbs and uses vitamin B12.
Magnesium may interact with:
- Osteoporosis medications: Magnesium can lower how well your body absorbs bisphosphonates, medications used to treat osteoporosis. An example is Fosamax (alendronate). If taking a bisphosphonate and magnesium, separate the doses by at least two hours.
- Antibiotics: Magnesium can affect certain antibiotics, like Cipro (ciprofloxacin) and Vibramycin (doxycycline). You should take antibiotics at least two hours before or four to six hours after taking magnesium.
Heartburn, acid reflux, and diuretic medications can also lower magnesium levels. Though they may not interact with the supplement, they can affect how much magnesium stays in your body. Examples of diuretics include Lasix (furosemide), Aldactone (spironolactone), and Bumex (bumetanide).

