Magnesium is an essential mineral that plays a role in hundreds of processes throughout the body. It supports normal muscle and nerve function, helps maintain healthy bones, contributes to energy production and is involved in regulating several important biological processes.
Despite its importance, some people may not get enough magnesium from their everyday diet. Likely, magnesium is naturally present in many nutritious foods including leafy green vegetables, nuts, seeds, legumes, whole grains and certain fruits.
Choosing a variety of magnesium rich foods can help you build a balanced diet while also providing fiber, protein, healthy fats, vitamins and other essential nutrients.
This guide explores the best foods high in magnesium, explains why magnesium matters, provides practical ways to add more magnesium to your meals and answers common questions about dietary magnesium.
What is Magnesium?
Magnesium is an essential mineral and electrolyte required for normal body function. The body uses magnesium in numerous biochemical reactions involving energy production, protein formation, muscle function, nerve signaling and blood glucose regulation.
The body stores much of its magnesium in bones and tissues while only a small amount circulates in the blood.
Because the body cannot produce magnesium it must come from food and when necessary supplements.
A varied diet containing vegetables, legumes, nuts, seeds, whole grains and other nutrient dense foods can provide significant amounts of magnesium.
Why is Magnesium Important?
Magnesium contributes to many aspects of health and normal body function.
1. Supports Muscle Function
Magnesium is involved in normal muscle contraction and relaxation. It works alongside other electrolytes to support proper muscle and nerve activity.
A balanced intake of magnesium, potassium, calcium and other nutrients is important for normal muscle function.
2. Supports Nerve Function
Magnesium participates in nerve signaling and helps maintain normal communication between nerves and muscles.
Adequate dietary intake is therefore part of maintaining normal nervous system function.
3. Helps Produce Energy
Magnesium is involved in energy metabolism. It helps the body use and produce energy from carbohydrates, fats and proteins.
While magnesium itself does not provide calories it helps support the biochemical reactions through which the body processes energy.
4. Supports Bone Health
A substantial amount of the body’s magnesium is stored in bones. Magnesium works together with nutrients such as calcium and vitamin D as part of the processes involved in maintaining normal bone structure.
A diet that includes magnesium rich foods can therefore contribute to an overall bone supportive eating pattern.
5. Contributes to Normal Blood Sugar Regulation
Magnesium is involved in carbohydrate metabolism and insulin related processes.
Eating magnesium rich foods as part of a balanced diet may support healthy metabolic function although no single mineral or food should be considered a treatment for blood sugar disorders.
6. Supports Heart and Cardiovascular Function
Magnesium contributes to normal muscle and nerve function including the normal function of the heart muscle.
A nutrient rich dietary pattern that includes magnesium containing foods can be part of an overall heart healthy lifestyle.

Best Magnesium Rich Foods
Many everyday foods provide magnesium. Here are some of the best options to consider adding to your meals.
1. Pumpkin Seeds
Pumpkin seeds are among the most concentrated dietary sources of magnesium.
They also provide protein, healthy fats, iron, zinc and other minerals.
You can add pumpkin seeds to:
- Oatmeal
- Yogurt
- Salads
- Smoothies
- Grain bowls
- Homemade trail mixes
A small serving can add both nutrients and a satisfying crunch.
2. Chia Seeds
Chia seeds are another excellent source of magnesium. They also provide fiber plant based omega-3 fatty acids and protein.
Try adding chia seeds to:
- Overnight oats
- Yogurt
- Smoothies
- Puddings
- Whole grain cereal
Because chia seeds absorb liquid, drinking enough fluids and incorporating them into moist foods can make them easier to consume.
3. Almonds
Almonds are a convenient magnesium containing snack and also provide protein, fiber, vitamin E and unsaturated fats.
Enjoy a small handful as a snack or sprinkle chopped almonds over oatmeal, salads, yogurt or roasted vegetables.
4. Cashews
Cashews contain magnesium along with copper, protein and healthy fats.
They can be eaten as a snack or used in cooking.
Cashews also work well in stir fries, salads, grain bowls and homemade sauces.
5. Peanuts
Peanuts provide magnesium, protein, healthy fats and other nutrients.
Choose unsalted or lightly salted peanuts when possible especially if you are trying to reduce sodium intake.
Natural peanut butter can also contribute magnesium although nutrition varies between products.
6. Spinach
Leafy green vegetables are valuable sources of magnesium and spinach is one of the most convenient options.
Spinach can be added to:
- Omelets
- Soups
- Salads
- Curries
- Smoothies
- Sandwiches
- Stir fries
Both fresh and cooked spinach can contribute nutrients to your diet.
7. Swiss Chard
Swiss chard is another leafy green that provides magnesium and other nutrients.
Saute it with garlic and olive oil, add it to soups or mix it into grain and bean dishes.
Eating a variety of leafy greens helps provide a broader range of vitamins and minerals.
8. Black Beans
Beans are excellent magnesium rich foods and also provide plant based protein and fiber.
Black beans can be used in:
- Burritos
- Tacos
- Salads
- Soups
- Chili
- Grain bowls
Other varieties, including kidney beans, navy beans and white beans can also contribute magnesium.
9. Lentils
Lentils are nutrient dense legumes that provide magnesium, iron, protein, fiber and folate.
They are particularly useful for plant based diets.
Add lentils to soups, curries, salads, stews or grain bowls.
10. Chickpeas
Chickpeas provide magnesium along with protein, fiber, folate and other nutrients.
Hummus is an easy way to include chickpeas in your diet. You can also add chickpeas to salads, curries, soups and roasted vegetable dishes.
11. Whole Grains
Whole grains can contribute magnesium while also providing fiber and complex carbohydrates.
Good choices include:
- Brown rice
- Oats
- Whole wheat bread
- Whole grain pasta
- Barley
- Buckwheat
- Quinoa
Replacing some refined grains with whole grains can increase the overall nutrient density of your diet.
12. Quinoa
Quinoa is technically a seed but is commonly prepared and eaten like a grain.
It provides magnesium, protein, fiber and other minerals.
Use quinoa as a base for salads and grain bowls or serve it alongside vegetables and legumes.
13. Dark Chocolate
Dark chocolate containing a high percentage of cocoa can provide magnesium and antioxidant compounds.
However, chocolate can also contain substantial amounts of added sugar and calories depending on the product.
Enjoying a modest portion of dark chocolate can fit into a balanced diet but it should not be your primary source of magnesium.
14. Avocados
Avocados provide magnesium along with potassium, fiber and unsaturated fats.
Add avocado to:
- Whole grain toast
- Salads
- Wraps
- Grain bowls
- Eggs
- Bean dishes
Their creamy texture also makes them useful for nutritious dips and spreads.
15. Bananas
Bananas are better known for their potassium content but they also provide magnesium.
They are easy to carry and can make a convenient snack.
Pair a banana with nuts, seeds or plain yogurt for a more balanced snack containing carbohydrates, protein and healthy fats.
16. Tofu
Tofu can contribute magnesium while providing plant based protein.
Use tofu in stir fries, curries, soups, salads and grain bowls.
Choose preparations that fit your overall dietary goals, such as baked, grilled, steamed or lightly sauteed tofu.
17. Fatty Fish
Certain fish can contribute magnesium as well as protein and omega-3 fatty acids.
Examples include salmon and mackerel.
Including fish in meals can provide several nutrients at once and can be part of a balanced dietary pattern.

How Much Magnesium Do You Need?
Magnesium requirements depend on age and sex.
For most adults recommended amounts are approximately 310–320 mg per day for women and 400–420 mg per day for men, although needs vary by life stage.
Requirements can also change during pregnancy and other stages of life.
The best way to meet nutritional requirements is generally through a varied diet. People with specific medical conditions, restricted diets or concerns about nutrient deficiencies may benefit from individualized guidance from a healthcare professional.
Magnesium Rich Foods for Vegetarians and Vegans
Plant based diets can provide plenty of magnesium because many plant foods are naturally rich in the mineral.
Useful options include:
- Pumpkin seeds
- Chia seeds
- Almonds
- Cashews
- Peanuts
- Spinach
- Swiss chard
- Black beans
- Lentils
- Chickpeas
- Tofu
- Quinoa
- Oatmeal
- Whole grains
- Avocados
A simple strategy is to include at least one magnesium containing food at each major meal.
For example oatmeal with chia seeds at breakfast, a lentil and spinach bowl at lunch and tofu with brown rice and vegetables at dinner.
Magnesium Rich Foods for Breakfast
Breakfast can be an easy opportunity to increase magnesium intake.
Try these combinations:
Oatmeal With Seeds and Fruit
Combine oats with chia seeds, pumpkin seeds, banana and berries.
Whole Grain Toast With Avocado
Top whole grain toast with avocado and add an egg or another protein source.
Yogurt Bowl
Combine plain yogurt with almonds, chia seeds, berries and a small amount of dark chocolate.
Smoothie
Blend spinach, banana, chia seeds, plain yogurt and fruit for a nutrient rich breakfast.
Magnesium Rich Foods for Lunch
For lunch consider meals built around legumes, whole grains, vegetables and healthy fats.
Examples include:
- Lentil and spinach soup
- Chickpea and quinoa salad
- Black bean grain bowl
- Tofu and vegetable stir fry
- Whole grain wrap with avocado and beans
- Spinach salad topped with nuts and seeds
Adding several nutrient rich ingredients makes it easier to obtain magnesium alongside other essential nutrients.
Magnesium Rich Foods for Dinner
Dinner can also provide plenty of magnesium.
Try:
- Salmon with quinoa and leafy greens
- Lentil curry with brown rice
- Tofu stir fry with vegetables and whole grains
- Black bean chili with avocado
- Grilled fish with roasted vegetables and a quinoa salad
- Chickpea and spinach curry
These meals combine magnesium containing foods with protein, fiber and other nutrients.
Magnesium Rich Snacks
If you need convenient snack options consider:
- Almonds
- Cashews
- Pumpkin seeds
- Peanuts
- Banana with peanut butter
- Plain yogurt with chia seeds
- Avocado on whole-grain toast
- A small portion of dark chocolate with nuts
Portion sizes matter because many nuts and seeds are calorie rich.
Can Magnesium Help With Sleep?
Magnesium is sometimes promoted as a natural sleep aid. Magnesium is involved in nervous system function and other processes that may relate to relaxation and sleep but eating magnesium rich foods should not be considered a guaranteed treatment for insomnia.
If you have ongoing sleep difficulties consider discussing them with a healthcare professional rather than relying solely on magnesium supplements.
A consistent sleep schedule, comfortable sleeping environment, physical activity, stress management and limiting excessive caffeine can also support healthy sleep habits.
Can Magnesium Help With Muscle Cramps?
Magnesium is important for normal muscle function which has led to widespread interest in magnesium supplements for muscle cramps.
However, muscle cramps can have many causes and magnesium supplementation does not necessarily resolve cramps in everyone.
If you frequently experience unexplained or severe muscle cramps seek professional advice to identify possible underlying causes.

Magnesium From Food vs. Supplements
For most people food is an excellent way to obtain magnesium.
Magnesium rich foods provide the mineral alongside other valuable nutrients such as:
- Fiber
- Protein
- Healthy fats
- Vitamins
- Antioxidants
- Other minerals
Supplements can be useful in certain situations but they are not automatically better than food.
High amounts of supplemental magnesium can cause digestive side effects including diarrhea and abdominal discomfort. Some forms of magnesium can also interact with medications.
If you are considering magnesium supplements particularly if you take medication or have kidney problems consult a healthcare professional first.
Factors That Can Affect Magnesium Status
Magnesium intake is influenced by overall dietary patterns but certain circumstances may affect magnesium status.
Potential risk factors for inadequate magnesium include:
- Highly restrictive diets
- Low intake of fruits, vegetables, legumes, nuts and whole grains
- Certain gastrointestinal conditions
- Some medications
- Excessive alcohol consumption
- Certain chronic health conditions
Having one of these factors does not automatically mean you are magnesium deficient. A healthcare professional can help determine whether further evaluation is appropriate.
Simple Tips to Eat More Magnesium Rich Foods
You don’t need to completely change your diet to increase magnesium intake.
Try these simple strategies:
- Add seeds to oatmeal or yogurt.
- Keep a small portion of nuts available for snacks.
- Eat leafy greens regularly.
- Replace some refined grains with whole grains.
- Add beans or lentils to soups and salads.
- Include avocado in sandwiches and grain bowls.
- Choose quinoa as an alternative to refined grains.
- Add spinach to eggs, curries and smoothies.
- Use chickpeas in salads and hummus.
- Include a variety of magnesium rich foods throughout the week.
Small consistent changes can make a significant difference in overall dietary quality.
Frequently Asked Questions
What foods are highest in magnesium?
Some of the richest common dietary sources include pumpkin seeds, chia seeds, almonds, cashews, peanuts, leafy green vegetables, beans, lentils, whole grains and certain fish.
What is the best magnesium rich food?
There is no single best food for everyone. Seeds, nuts, legumes, leafy greens and whole grains can all make important contributions to magnesium intake.
Are bananas high in magnesium?
Bananas contain magnesium but they are not among the most concentrated sources. They can still contribute to overall intake and provide other nutrients such as potassium and carbohydrates.
Is spinach a good source of magnesium?
Yes. Spinach is a nutritious leafy green that provides magnesium along with several other vitamins and minerals.
Are nuts high in magnesium?
Yes. Almonds, cashews, peanuts and several other nuts provide magnesium. They also contain protein, healthy fats and other nutrients.
What foods contain magnesium for a vegetarian diet?
Vegetarians can get magnesium from pumpkin seeds, chia seeds, almonds, cashews, beans, lentils, spinach, quinoa, oats, whole grains, tofu and avocados.
Can you get enough magnesium from food?
Many people can meet their magnesium needs through a varied diet containing legumes, nuts, seeds, whole grains, leafy greens and other nutrient dense foods.
Should I take a magnesium supplement?
Not everyone needs a magnesium supplement. Food is generally a preferred source while supplements may be appropriate for certain individuals under professional guidance.
What happens if you don’t get enough magnesium?
Inadequate magnesium intake can contribute to health problems particularly when deficiency is significant or prolonged. Possible symptoms can include weakness, fatigue, muscle problems, or abnormal heart rhythms in severe cases. Symptoms are not specific to magnesium deficiency so medical evaluation may be necessary.
When to Talk to a Healthcare Professional
If you are concerned that you may not be getting enough magnesium speak with a healthcare professional or registered dietitian.
Professional guidance is particularly important if you:
- Have a chronic health condition
- Have kidney disease
- Take medications regularly
- Have persistent digestive problems
- Follow a highly restrictive diet
- Are considering high dose magnesium supplements
- Have unexplained or persistent symptoms
Avoid using high dose supplements simply because a food or supplement is marketed as a solution for sleep, stress, muscle cramps or other health concerns.
Conclusion
Magnesium rich foods can be an important part of a balanced and nutrient dense diet. Magnesium supports normal muscle and nerve function, energy metabolism, bone health and numerous other processes throughout the body.
Some of the best dietary sources include pumpkin seeds, chia seeds, almonds, cashews, peanuts, spinach, Swiss chard, beans, lentils, chickpeas, quinoa, whole grains, tofu, avocados and certain fish.
The easiest way to increase magnesium intake is not to rely on one particular food. Instead build variety into your meals. Add seeds or nuts to breakfast, include legumes and leafy greens at lunch, choose whole grains throughout the day and include magnesium containing foods such as tofu, fish, beans or vegetables at dinner.
For most people, obtaining magnesium from whole foods offers the additional advantage of getting fiber, protein, healthy fats, vitamins, minerals and beneficial plant compounds at the same time.
A balanced dietary pattern remains the foundation of good nutrition. If you suspect magnesium deficiency or are considering supplements especially if you have a medical condition or take medication consult a qualified healthcare professional for personalized guidance.


3 Responses
[…] Magnesium […]
[…] Magnesium […]
[…] Magnesium participates in hundreds of biochemical reactions and contributes to normal muscle and nerve function, energy metabolism and electrolyte balance. […]