Affiliate links on our site may earn us commissions. Learn More.

This website uses cookies. By continuing to use this website you are giving consent to cookies being used. Visit our Privacy Policy.


Discover The Best Wellness Tips In Your Inbox

Subscribe to Health Reporter’s newsletter and get our health experts’ highlights and the latest news about healthy living.
The newsletters are spam-free and sent from our health experts and professionals.

Thank You!

You have successfully subscribed to our newsletter!
Home arrow Nutrition arrow Keto Diet arrow Keto and Magnesium: Best Types and Benefits

Keto and Magnesium: Best Types and Benefits

Written by Edibel Quintero, RD
Fact checked by Rosmy Barrios, MD
Last update: October 5, 2023
5 min read 1467 Views 0 Comments
clock 5 eye 1467 comments 0

Magnesium is an important mineral in your body and can help to ease the transition into the keto diet. Check out our article to learn more about how magnesium and the keto diet work together.

Keto and magnesium

Magnesium is an essential mineral in your body. It helps to support your immune system, regulate blood glucose levels, and boost overall energy levels. Magnesium deficiency is thought to be relatively common due to a reliance on processed foods and medication that depletes the body’s stores.

While on the ketogenic diet, you cannot eat many of the starchy vegetables and beans that contain this nutrient as they are high-carb foods. The keto diet is a low-carb diet and requires you to eat a much smaller carb intake while increasing your fat intake.

In this article, we’re going to look at the relationship between the ketogenic diet and magnesium, whether magnesium supplements are necessary, other ways to boost your magnesium intake, and some of the benefits of taking a magnesium supplement on the keto diet. Keep reading to find out more.

Keto and Magnesium: How Much Do You Need?

The ketogenic diet makes it difficult to get this essential mineral from food intake alone. Magnesium is found in the highest quantities in beans, legumes, and starchy vegetables, all of which have a very high carb content and are not keto-friendly. By cutting out many magnesium-rich foods, you risk developing a deficiency.

While on the ketogenic diet, it is best to take 200–400mg of magnesium to ensure that you’re getting enough magnesium each day. Magnesium supplementation can help ease muscle cramps and irritability, common symptoms of the transition to the keto diet.

There is some anecdotal evidence of symptoms of the “keto flu” as you transition to the ketogenic diet. These symptoms, which include headaches, brain fog, irritability, and fatigue, are thought by some to be symptoms of low magnesium. Therefore, taking a magnesium supplement could ease the transition and keep these negative side effects at bay.

While on the ketogenic diet, it is very important to maintain a balanced diet so that you get all of the vitamins and minerals your body needs. Look out for keto-friendly foods, like spinach, other leafy greens, and avocado, which have high magnesium levels, to stay in good health.

What Is the Best Type of Magnesium for Keto?

There are many different forms of magnesium supplements, including magnesium citrate, magnesium oxide, and magnesium glycinate. The best option to maintain good magnesium levels on the ketogenic diet is magnesium glycinate.

Magnesium glycinate is bound with glycine. It is known to improve sleep and symptoms of stress. It is also the least harsh form of magnesium on the body and doesn’t appear to come with any side effects.

Magnesium citrate is a popular form of magnesium supplement and is widely available and affordable. It is thought to relax muscle tension and nighttime cramping, but as citric acid is a mild laxative, it could cause diarrhea. Magnesium citrate is the most commonly recommended magnesium supplement, but be aware of some of the side effects.

Magnesium oxide contains the most elemental magnesium. However, it is the least bioavailable source of magnesium you can find. It goes unabsorbed through your body and has powerful laxative effects when it reaches your bowels. This supplement is commonly used as effective constipation relief.

Aside from magnesium citrate, glycinate, and oxide, there are a few other magnesium supplements you may come across. Magnesium chloride is commonly used topically to help ease muscle cramps, and magnesium sulfate is found in Epsom salts and used for the same thing.

Magnesium citrate and glycinate appear as the most bioavailable sources of magnesium and have the least side effects, making them good options for supplementation while on the ketogenic diet. Magnesium oxide could also be used to relieve constipation experienced on the ketogenic diet.

As the keto flu is thought to be caused by symptoms of low magnesium, you could try supplementing as you start the keto diet to ensure you don’t experience headaches, fatigue, or nausea.

Can Magnesium Cause Constipation on Keto?

Magnesium supplementation is more likely to cause diarrhea, loose stools, and cramps. Indeed, magnesium oxide is regularly used as a form of constipation relief. If you are experiencing constipation on the ketogenic diet, it is unlikely because you are taking magnesium supplements.

Iin this case, you may want to try other methods of relief. You could try eating more high-fiber keto-friendly foods as well as drinking more water and getting more exercise. Walking a few miles each day or taking up cycling could help you have more frequent stools.

Keto Foods High in Magnesium

Leafy greens, like spinach, collard greens, and kale, have high levels of magnesium, as well as other minerals. They’re an excellent source of fiber and can help to boost your overall health. They’re also a low-carb food, making them suitable for keto dieters.

If you want to boost your magnesium levels by eating more magnesium-rich foods, there are a few keto-friendly foods you can add to your diet that can boost how much magnesium you get each day.

Avocados also have high magnesium levels. They’re well-known for having high levels of good fats and lots of fiber. Another fatty food with high magnesium levels is fatty fish, like tuna and salmon. Lastly, many nuts and seeds have high magnesium levels as well as good fat content. Eat more pumpkin seeds, almonds, cashews, peanuts, and chia seeds.

4 Benefits of Magnesium for Keto

Taking magnesium supplements while on the keto diet is a good idea to maintain your overall health. Magnesium has a ton of health benefits for the keto diet. We’ve summarized them below.

#1 Helps to regulate blood glucose

Magnesium is known to support better blood sugar regulation. Indeed, people with magnesium deficiency are at a higher risk of developing type 2 diabetes. Magnesium may also play a role in enhancing insulin sensitivity.

The keto diet is thought to be a good diet for those with diabetes. It may help them regulate their blood sugar levels. Magnesium supplements could support this too.

#2 Supports immunity

Magnesium has a strong relationship with the immune system, and low magnesium levels have been linked to high levels of inflammation. Inflammation has been linked to a number of chronic illnesses, including diabetes, heart disease, and stroke. It has also been linked to aging.

#3 Maintains heart functioning

Magnesium is known to lower blood pressure levels. High blood pressure is a marker of poor heart health and can lead to a range of cardiovascular diseases. The ketogenic diet is a low-carb, high-fat diet that is thought to increase heart health. Getting more good fats in your diet can boost heart health, as can magnesium.

#4 Maintains normal muscle functioning

Magnesium plays a role in the process of muscle contraction. Taking magnesium may help to reduce muscle cramps and support the proper functioning of the muscles.

There is some evidence that magnesium can help muscle growth and could prevent muscle damage. It may also improve exercise performance.

A Word From Our Nutritionist

Magnesium is essential to our body. It plays a role in a number of bodily processes, including improving immune health, maintaining muscle health, supporting healthy blood glucose levels, and reducing inflammation.

On the ketogenic diet, magnesium should be taken as a dietary supplement. This is because most of the foods that are high in magnesium levels are also high in carbohydrates. The ketogenic diet requires you to eat a low carbohydrate diet to maintain the state of ketosis.

Ketosis is a metabolic state where the body burns stored body fat for fuel instead of carbohydrates. It is broken when carbohydrates are consumed, and your blood sugar levels are raised high enough for insulin response.

Many sources of magnesium are carbohydrate-rich foods, including legumes, beans, and starchy vegetables. On the keto diet, you can consume magnesium-rich foods like avocado, leafy greens, and some nuts and seeds like pumpkin seeds. You can also have dark chocolate in limited quantities.

You can also take a supplement. Magnesium comes in various forms, including magnesium citrate, magnesium lactate, magnesium carbonate, and magnesium malate. The best kinds of magnesium to take include magnesium citrate and glycinate.

Magnesium sometimes comes with side effects, including diarrhea, loose stools, and cramping. If you experience any of these symptoms, you could try changing your supplement form or reducing your dosage.

Magnesium is unlikely to cause constipation on the ketogenic diet, but if it does, there are a number of home remedies you could try, like drinking more water, taking a fiber supplement, and getting more exercise. Exercise could include going for walks each morning or long-distance runs.

The ketogenic diet is thought to have a range of health benefits, and taking magnesium while you’re on the diet can help you maintain your health.


Magnesium is a good supplement to add to your diet when eating the keto way. It can support better blood glucose regulation, reduce muscle cramps, and may ease the transition to eating a low-carb, high-fat diet. It shouldn’t have too many side effects but if it does, consider changing the supplement type.

Written by Edibel Quintero, RD
Edibel Quintero is a medical doctor who graduated in 2013 from the University of Zulia and has been working in her profession since then. She specializes in obesity and nutrition, physical rehabilitation, sports massage and post-operative rehabilitation. Edibel’s goal is to help people live healthier lives by educating them about food, exercise, mental wellness and other lifestyle choices that can improve their quality of life.
The article was fact checked by Rosmy Barrios, MD
Was this article helpful?
Thank you! We received Your feedback
Written by Edibel Quintero, RD
Fact checked by Rosmy Barrios, MD
Last update: October 5, 2023
5 min read 1467 Views 0 Comments

Leave a comment

Thank you for your comment!
We will review it as soon as possible.
Your Name
Missing required field
Your Comment
Missing required field