Magnesium does not get as much attention as calcium, oxalate, or sodium when it comes to kidney stone prevention — but it plays an important supporting role. Adequate magnesium may help reduce your risk of calcium-based kidney stones, especially calcium oxalate stones.
This guide explains how magnesium contributes to prevention, how much you need, where to get it from food, when supplements make sense, and how to fit it all into a balanced day.
Why Magnesium Matters
Magnesium is involved in hundreds of processes in the body. For kidney stone prevention specifically, it:
- Binds with oxalate in the digestive tract, reducing how much reaches the kidneys
- Helps keep urinary calcium and oxalate in a form that is less likely to crystallize
- Supports overall citrate metabolism, particularly in magnesium citrate form
- Plays a role in normal bone metabolism and calcium regulation
Chronically low magnesium intake has been associated with higher rates of calcium oxalate stones in several studies, though the effect is modest compared to hydration or sodium changes.
Daily Magnesium Targets
| Group | Recommended Dietary Allowance |
|---|---|
| Men 19–30 | 400 mg |
| Men 31+ | 420 mg |
| Women 19–30 | 310 mg |
| Women 31+ | 320 mg |
| Pregnant women | 350–360 mg |
Roughly half of adults in the U.S. fall short of these numbers day to day.
Best Food Sources of Magnesium
Seeds and Nuts
- Pumpkin seeds — ~150 mg per ounce
- Chia seeds — ~110 mg per ounce
- Almonds — ~80 mg per ounce (higher oxalate; small portions)
- Cashews — ~75 mg per ounce (higher oxalate; small portions)
- Peanuts and peanut butter — ~50 mg per ounce
- Sunflower seeds — ~35 mg per ounce
Whole Grains and Legumes
- Cooked spinach — ~155 mg per cup (very high oxalate; small portions)
- Cooked black beans — ~120 mg per cup
- Cooked lentils — ~70 mg per cup
- Cooked brown rice — ~85 mg per cup
- Cooked oats — ~60 mg per cup
- Whole wheat bread — ~25 mg per slice
Vegetables
- Cooked Swiss chard — ~150 mg per cup (high oxalate; small portions)
- Baked potato with skin — ~50 mg
- Avocado — ~60 mg per medium
- Broccoli — ~30 mg per cup
- Green beans — ~25 mg per cup
Fish, Dairy, and Others
- Salmon — ~30 mg per 4 oz
- Halibut — ~90 mg per 4 oz
- Mackerel — ~80 mg per 4 oz
- Plain yogurt — ~40 mg per cup
- Milk — ~25 mg per cup
- Dark chocolate (70%+) — ~65 mg per ounce (high oxalate; small portions)
Low-Oxalate Magnesium Sources
Because several excellent magnesium foods (spinach, almonds, cashews, dark chocolate) are also high in oxalate, it helps to lean on lower-oxalate magnesium options:
- Pumpkin seeds in moderate portions
- Avocado
- Plain yogurt
- Milk
- Salmon and other cold-water fish
- White beans and lentils in reasonable portions
- Bananas and oranges
- Winter squash
- Sunflower seeds
- Cooked broccoli and green beans
Sample Magnesium-Rich, Lower-Oxalate Day
- Breakfast: Plain yogurt with sliced banana and a small sprinkle of pumpkin seeds; whole-grain toast; coffee; large glass of water.
- Mid-morning: Small handful of sunflower seeds; water.
- Lunch: Grilled salmon salad with mixed greens, avocado, cucumber, tomato, and olive oil dressing; sparkling water.
- Afternoon: Milk with a small piece of fruit; water.
- Dinner: Baked halibut, brown rice, roasted broccoli, and green beans; lemon water.
- Evening: Herbal tea; a light snack of yogurt.
Magnesium Supplements: When and How
Supplements can help fill nutritional gaps but should be used carefully. Common forms include:
| Form | Notes |
|---|---|
| Magnesium citrate | Well absorbed; also raises urinary citrate — favored for stone prevention |
| Magnesium glycinate | Gentle on stomach; good for general use |
| Magnesium oxide | Cheap but poorly absorbed; often causes GI upset |
| Magnesium chloride | Well absorbed; used both orally and topically |
| Magnesium sulfate | Typically medical use (IV or Epsom salts) |
Typical stone-prevention doses run around 200–400 mg of elemental magnesium per day, ideally in divided doses with meals. Always discuss dosing with your provider.
Safety Notes
- High doses can cause diarrhea, cramping, and dehydration
- People with reduced kidney function should not supplement without medical guidance
- Magnesium can interact with certain antibiotics, diuretics, and bisphosphonates
- Do not exceed the tolerable upper intake level of 350 mg per day from supplements unless prescribed
Magnesium in a Broader Prevention Plan
Magnesium works best when combined with the rest of the stone-prevention essentials:
- Plenty of fluids — see our hydration guide
- Adequate dietary calcium — see our calcium guide
- Lower sodium — see our sodium guide
- Reasonable protein portions
- Fruits and vegetables for potassium and citrate
Common Mistakes to Avoid
- Chasing magnesium only through spinach and nuts, adding a heavy oxalate load
- Taking high-dose magnesium supplements without checking with a provider
- Assuming magnesium can replace hydration or calcium
- Ignoring low magnesium in the setting of diarrhea, alcohol use, or certain medications
- Overlooking magnesium-rich lower-oxalate foods like fish, avocado, and yogurt
References
- NIH Office of Dietary Supplements — Magnesium Fact Sheet.
- National Kidney Foundation — Nutrition and Kidney Stones.
- National Institute of Diabetes and Digestive and Kidney Diseases (NIDDK / NIH) — Diet for Kidney Stone Prevention.
- Mayo Clinic — Kidney Stones: Prevention.
- American Urological Association — Medical Management of Kidney Stones Guideline.
- Cleveland Clinic — Magnesium: Foods, Function, and Health Effects.
The Bottom Line
Magnesium is a quiet but useful piece of the kidney stone prevention picture. Getting enough from a variety of lower-oxalate foods — yogurt, fish, avocado, pumpkin seeds, beans, whole grains — supports the rest of your plan. Consider magnesium citrate supplements only with medical guidance and never as a replacement for hydration, adequate calcium, or lower sodium.



