Selection of magnesium-rich foods including pumpkin seeds, almonds, spinach, beans, oats, avocado, bananas and dark chocolate.

Magnesium in Food

An Easy Guide to Magnesium-Rich Foods, Dietary Sources and Daily Intake
Published: 20 October 2026

Quick Answer

What Foods Are High in Magnesium?

Magnesium is naturally found in many everyday foods, particularly nuts, seeds, beans, leafy green vegetables and whole grains.

Some of the richest food sources include pumpkin seeds, chia seeds, almonds, cashews, spinach, black beans and wholegrain cereals.

You can also get magnesium from foods such as bananas, avocados, dark chocolate, fish and dairy products, although the amounts vary considerably.

Eating a varied diet containing several magnesium-rich foods can help you meet your daily requirements without necessarily needing supplements.

Magnesium in Food: Key Points

  • Nuts and seeds: Pumpkin seeds, chia seeds, almonds and cashews are useful sources of magnesium.
  • Vegetables: Spinach and other leafy greens provide magnesium alongside other nutrients.
  • Beans and whole grains: Lentils, beans, oats and wholegrain bread contribute to daily magnesium intake.
  • Fruit: Bananas and avocados contain magnesium, although they are not among the richest sources.
  • Daily intake: Your magnesium requirements depend on factors including age and sex.
  • Food first: Many people can obtain enough magnesium through a varied diet.

Examples of Foods High in Magnesium

The following everyday foods are good sources of magnesium. The amounts shown are approximate and depend on serving size and preparation.

FoodExample servingApproximate magnesium
Pumpkin seeds28 g156 mg
Chia seeds28 g95 mg
Almonds28 g80 mg
Cashews28 g74 mg
Spinach, cooked½ cup78 mg

Magnesium values are approximate and may vary by food variety, preparation and serving size.

What Does Magnesium Do in the Body?

Illustration showing magnesium's roles in muscle function, the nervous system, energy metabolism, bone health and glucose metabolism
Magnesium supports several normal body functions, including muscles, nerves, energy production and bone health, and is involved in glucose metabolism.

About Magnesium in Food

What Is Magnesium in Food?

Magnesium is an essential mineral found naturally in a wide variety of foods. Your body needs it for normal muscle and nerve function, energy production and maintaining healthy bones.

Who Needs Magnesium from Food?

Everyone needs magnesium, including children, adults and older people. The amount required varies with age, sex and life stage.

Why Is Magnesium in Food Important?

Food provides magnesium alongside other important nutrients, including protein, fibre, vitamins and minerals.

When Should You Eat Magnesium-Rich Foods?

There is no particular time of day when magnesium-rich foods must be eaten. Including a variety of them in your regular meals is generally more useful than concentrating on one particular food.

Where Is Magnesium Found Naturally?

Magnesium occurs in plant and animal foods, including nuts, seeds, vegetables, beans, grains, fish and dairy products. Some drinking water also contains magnesium.

How Can You Get More Magnesium from Food?

Simple changes, such as choosing wholegrain bread, adding seeds to breakfast or including beans and leafy greens in meals, can help increase dietary magnesium intake.

What Foods Are High in Magnesium?

Some foods naturally contain much more magnesium than others.

Nuts, seeds, legumes and whole grains are particularly useful sources. Green leafy vegetables also contain magnesium because the mineral forms part of chlorophyll, the substance that gives plants their green colour.

You do not need to eat unusual foods to increase your magnesium intake. Many familiar foods, including porridge oats, wholegrain bread, peanut butter, beans and spinach, can contribute.

The important consideration is the amount of magnesium in a normal serving, rather than simply whether a food contains magnesium.

Magnesium-Rich Foods List and Comparison Table

The following table shows examples of magnesium-rich foods and approximate amounts per serving.

FoodExample servingApproximate magnesium
Pumpkin seeds28 g156 mg
Chia seeds28 g95 mg
Almonds28 g80 mg
Cashews28 g74 mg
Spinach, cooked½ cup78 mg
Black beans, cooked½ cup60 mg
Peanut butter2 tablespoons49 mg
Brown rice, cooked½ cup42 mg
Banana1 medium32 mg
Milk1 cup24–27 mg

Values are approximate and vary according to the food variety, preparation and serving size. Figures should be checked against the final nutritional reference dataset before publication.

Pumpkin seeds provide considerably more magnesium per serving than bananas, for example. However, both can contribute to a balanced diet.

Magnesium-Rich Food Groups

Educational illustration showing magnesium-rich nuts, seeds, leafy vegetables, beans, whole grains, fruit and fish.
Magnesium is found in a wide range of everyday foods, including nuts, seeds, leafy greens, legumes, whole grains and some animal products.

Nuts and Seeds High in Magnesium

Nuts and seeds are among the most concentrated dietary sources of magnesium.

Common examples include pumpkin seeds, chia seeds, almonds, cashews, peanuts and sunflower seeds.

They can be eaten as snacks or added to breakfast cereals, salads and other meals.

Because nuts and seeds are relatively energy-dense, a modest portion can provide useful magnesium without requiring large quantities.

Vegetables and Leafy Greens

Green leafy vegetables are another useful source of magnesium.

Spinach and Swiss chard are particularly good examples. Other vegetables, including broccoli, also provide smaller amounts.

Cooking changes the weight and volume of vegetables, so magnesium figures for raw and cooked servings should not be compared without checking portion sizes.

Including a variety of vegetables provides magnesium alongside fibre, vitamins and other minerals.

Beans, Lentils and Legumes

Beans, lentils and other legumes provide magnesium together with plant protein and fibre.

Examples include:

  • Black beans
  • Kidney beans
  • Chickpeas
  • Lentils
  • Soybeans and tofu

These foods can be added to soups, stews, salads and everyday meals.

They are particularly useful for people following vegetarian or plant-based diets, although they can form part of any balanced diet.

Whole Grains and Cereals

Whole grains naturally contain magnesium, particularly in the bran and germ portions of the grain.

Examples include oats, brown rice, quinoa, wholegrain bread and whole-wheat pasta.

Refining grains removes some of these components, which can reduce their magnesium content.

Choosing wholegrain alternatives where practical is a simple way to increase magnesium intake.

Some breakfast cereals are also fortified with magnesium, so their nutritional labels can be useful.

Everyday Food Sources of Magnesium

Realistic photograph showing magnesium-containing foods including salmon, avocado, banana, yoghurt, dark chocolate and wholegrain bread.
Foods such as fish, fruit, dairy products and whole grains also contribute magnesium to a varied diet.

Fruit, Fish, Dairy and Other Sources

Magnesium is not limited to nuts, seeds and vegetables.

Other foods and drinks contribute smaller amounts throughout the day.

  • Fruit: Bananas and avocados contain magnesium, although neither provides as much per typical serving as pumpkin seeds.
  • Fish: Salmon, mackerel and other fish contribute magnesium alongside protein and other nutrients.
  • Dairy: Milk and yoghurt provide some magnesium, although they are generally not the most concentrated sources.
  • Dark chocolate: Cocoa contains magnesium, so dark chocolate can contribute to intake. However, it should not be relied upon as a main dietary source.
  • Drinking water: Some mineral waters and tap water contain magnesium. The amount varies considerably by water source.

The benefit of a varied diet is that smaller contributions from many foods can add up.

How Much Magnesium Do You Need Each Day?

The amount of magnesium needed each day varies according to age, sex and life stage.

Different countries also publish slightly different dietary recommendations.

For example, UK guidance recommends approximately:

GroupDaily magnesium intake
Adult men, 19–64 years300 mg
Adult women, 19–64 years270 mg

US recommendations are higher for some adult groups, reflecting differences in how dietary reference values are established.

These figures describe recommended dietary intake, not a requirement to obtain the entire amount from one particular food.

Pregnancy, breastfeeding, age and individual medical circumstances may affect nutritional needs.

How to Get Enough Magnesium Through Food

Everyday Meals with Magnesium-Rich Foods

Three everyday meals containing magnesium-rich foods: porridge with nuts and seeds, chickpea and avocado salad, and brown rice with beans and vegetables.
Simple meals such as porridge with seeds, chickpea salad and brown rice with beans can help increase magnesium intake through everyday food.

Increasing dietary magnesium does not need to involve complicated meal plans.

A few everyday choices can make a difference:

  • Choose porridge oats or wholegrain cereal for breakfast.
  • Add a modest serving of nuts or seeds to meals.
  • Include beans, lentils or chickpeas regularly.
  • Choose wholegrain bread, rice or pasta where practical.
  • Eat a variety of leafy green vegetables.
  • Include magnesium-containing foods across several meals rather than relying on one source.

For most people, a varied diet is a sensible starting point.

Anyone concerned about a possible magnesium deficiency should seek appropriate medical advice rather than relying on dietary changes alone.

What Affects Magnesium Absorption?

Your body absorbs magnesium from food through the digestive system.

The amount absorbed can vary depending on dietary intake, individual health and other factors.

Some plant foods contain phytates, natural compounds that can reduce the absorption of certain minerals. However, foods containing phytates, such as whole grains, nuts and legumes, can still be valuable sources of magnesium.

Food processing can also affect magnesium content. For example, refining grains may remove magnesium-rich parts of the grain.

Certain digestive conditions and medications may affect magnesium absorption or the body’s magnesium balance.

For most healthy people, eating a varied diet remains a practical approach.

Magnesium in Food vs Supplements

Comparison of magnesium-rich foods including nuts, seeds, spinach and whole grains alongside realistic magnesium supplement bottles and retail pouches.
Magnesium is naturally present in many foods, while supplements provide measured amounts of magnesium in different formulations.

Magnesium can be obtained through everyday foods or dietary supplements, but the two are not identical.

Magnesium in foodMagnesium supplements
Naturally present in a variety of foodsProvided in concentrated products
Comes alongside other nutrientsSupplies a measured quantity of magnesium
Can contribute to daily intake through mealsMay be considered when dietary intake is insufficient or for specific medical reasons
Usually does not require a separate productRequires attention to dose, formulation and possible interactions

Magnesium supplements come in different forms, including magnesium citrate, glycinate and oxide.

The amount of elemental magnesium and how a product is used can vary between formulations.

Food is generally the preferred starting point for obtaining essential nutrients, but supplements may be appropriate in some circumstances.

Taking too much magnesium from supplements can cause side effects, particularly digestive problems. People with kidney disease or those taking certain medicines should seek professional advice before supplementing.

Frequently Asked Questions

What Food Has the Most Magnesium?

Pumpkin seeds are among the richest commonly eaten sources of magnesium, although the exact ranking depends on whether foods are compared by weight or by normal serving size.

No. A medium banana contains approximately 32 mg of magnesium, which is only a small proportion of an adult’s daily requirement.

Bananas are better known as a source of potassium, but they also contribute some magnesium.

Some mineral waters contain substantial amounts of magnesium, depending on their source. Milk and certain fortified drinks also provide magnesium.

Check the nutritional information, as magnesium levels can vary widely.

Include a combination of nuts, seeds, whole grains, beans and vegetables in your regular diet.

You do not need to obtain your entire daily intake from one food.

Coffee and tea can contain small amounts of magnesium, but the quantity depends on preparation and serving size. They are generally not the richest dietary sources.

No ordinary food needs to be labelled as completely blocking magnesium absorption.

Some compounds, including phytates found in certain plant foods, can influence mineral absorption, but those foods may still be useful magnesium sources.

Getting enough magnesium through food helps maintain normal magnesium levels and reduces the risk of inadequate dietary intake.

However, magnesium deficiency can also be associated with medical conditions, medication use and problems with absorption.

For most people, magnesium-rich foods are safe as part of a balanced diet.

Individual food allergies, medical conditions and dietary restrictions still need to be considered.

Magnesium from ordinary foods is not generally associated with the digestive side effects sometimes caused by high-dose supplements.

However, individual foods can cause digestive discomfort or allergic reactions in some people.

Ordinary magnesium-containing foods are generally compatible with most medicines, although specific medical diets and individual circumstances may require adjustments.

Magnesium supplements have more significant interaction considerations, including with certain antibiotics and osteoporosis medicines.

Ask a pharmacist or healthcare professional if you have concerns about a particular medicine.

Summary

Magnesium is an essential mineral found naturally in many everyday foods.

Nuts, seeds, beans, leafy green vegetables and whole grains are particularly useful sources, while fruit, fish, dairy products and some drinks contribute smaller amounts.

A varied diet can help many people meet their magnesium needs without relying on supplements.

The simplest approach is to include a range of magnesium-containing foods in regular meals rather than focusing on one particular ingredient.

Further Reading

National Institutes of Health — Magnesium Fact Sheet for Health Professionals

The NIH magnesium fact sheet provides detailed information about food sources, dietary requirements, absorption and magnesium safety.

NHS — Vitamins and Minerals: Magnesium

The NHS guidance on magnesium outlines common dietary sources and recommended daily amounts for adults.

Harvard T.H. Chan School of Public Health — Magnesium

The Harvard Nutrition Source guide to magnesium discusses magnesium in the diet, its functions in the body and relevant nutritional research.

Healthdirect Australia — Foods High in Magnesium

The Healthdirect Australia guide to magnesium-rich foods explains common dietary sources and provides practical information about magnesium intake.

Medical Disclaimer

This article provides general educational information about magnesium in food and is not a substitute for professional medical advice, diagnosis or treatment.

Individual magnesium requirements may vary. If you have a medical condition, take regular medication or suspect a magnesium deficiency, consult a qualified healthcare professional before making significant dietary changes or taking supplements.

Author

Written by J. Henderson
Health & Nutrition Research Writer

J. Henderson writes evidence-based guides about nutrition, supplements and everyday health. His work brings together scientific research and trusted health information, explaining complex topics in clear, practical language to help readers understand their options and make informed decisions.

Related Guides
Selection of magnesium-rich foods including pumpkin seeds, almonds, spinach, beans, oats, avocado, bananas and dark chocolate.

Magnesium in Food

Magnesium is naturally found in many everyday foods, particularly nuts, seeds, beans, leafy green vegetables and whole grains.

Different magnesium supplement compounds displayed on a pharmacy counter, including glycinate, citrate, malate, oxide, L-threonate and taurate

Types of Magnesium

There are several types of magnesium, including magnesium glycinate, citrate, oxide, malate and L-threonate.