Magnesium-rich foods: what they contain and why magnesium matters
Magnesium is needed for hundreds of processes in the body, including muscle and nerve function and building bone [WHO]. It is spread widely across plant foods, so a varied diet offers plenty of sources [ICMR-NIN].
Last reviewed: 2026-09-03
How much magnesium is in common foods
Values are milligrams of magnesium per 100 g edible portion. Seeds and nuts sit at the top, with whole grains and legumes close behind.
| Food | Magnesium per 100 g | Type | Source |
|---|---|---|---|
| Pumpkin seeds | 592 mg | Seeds | USDA |
| Sesame seeds (til) | 351 mg | Seeds | USDA |
| Chia seeds | 335 mg | Seeds | USDA |
| Cashew nuts | 292 mg | Nuts | USDA |
| Almonds | 270 mg | Nuts | USDA |
| Buckwheat | 231 mg | Grain | USDA |
| Dark chocolate (70–85%) | 228 mg | Other | USDA |
| Oats (raw) | 177 mg | Grain | USDA |
| Peanuts | 168 mg | Nuts | USDA |
| Finger millet (ragi) | 137 mg | Grain | ICMR-NIN |
| Pearl millet (bajra) | 137 mg | Grain | ICMR-NIN |
| Soybeans (cooked) | 86 mg | Legume | USDA |
| Spinach (raw) | 79 mg | Greens | USDA |
| Black beans (cooked) | 70 mg | Legume | USDA |
| Quinoa (cooked) | 64 mg | Grain | USDA |
| Kidney beans (rajma) (cooked) | 45 mg | Legume | USDA |
| Brown rice (cooked) | 44 mg | Grain | USDA |
Vegetarian and vegan sources
Magnesium is a plant-food nutrient: seeds, nuts, whole grains, millets, legumes and dark leafy greens are all rich in it, and dark chocolate adds more [ICMR-NIN, USDA]. Vegetarian and vegan diets built on these foods usually supply magnesium comfortably.
Whole grains keep more magnesium than refined ones
Much of a grain's magnesium sits in the bran and germ, which milling removes — so whole grains and millets hold more than refined flour and polished rice [ICMR-NIN]. Phytates in whole grains and legumes lower magnesium absorption a little; soaking, sprouting and fermenting reduce them [ICMR-NIN].
Magnesium and your blood test
A serum magnesium test shows the level in your blood, though most of the body's magnesium sits in bone and cells. If you have a lab report, ReadMyReport explains what your result means.
Frequently asked questions
- Which foods are highest in magnesium?
- Seeds such as pumpkin, sesame and chia lead, followed by nuts like cashews and almonds [USDA].
- What are good vegetarian sources of magnesium?
- Seeds, nuts, whole grains, millets, legumes and dark leafy greens are all strong sources [ICMR-NIN, USDA].
- Do whole grains and millets contain magnesium?
- Yes. Whole grains and millets such as ragi and bajra are good sources, more so than refined grains [ICMR-NIN].
- Does dark chocolate contain magnesium?
- Yes. Dark chocolate is notably rich in magnesium compared with most everyday foods [USDA].
- Does refining or polishing grains affect magnesium?
- Yes. Milling removes the bran and germ where much of the magnesium sits, so whole grains keep more than refined ones [ICMR-NIN].
- Can vegetarians and vegans get enough magnesium?
- Usually, yes. Plant foods are rich in magnesium, so a varied plant-based diet supplies plenty [ICMR-NIN].
- What does magnesium do in the body?
- It supports muscle and nerve function and helps build bone, among many other roles [WHO].
Sources
- USDA FoodData Central — USDA FoodData Central, Agricultural Research Service. https://fdc.nal.usda.gov/
- ICMR-NIN — Indian Food Composition Tables 2017, National Institute of Nutrition. https://www.nin.res.in/
- WHO — World Health Organization — magnesium and nutrition. https://www.who.int/