>_Deketox

GUIDE

Electrolytes on the ketogenic diet: what to know about sodium, potassium and magnesium

Published on August 27, 2026

Sodium, potassium and magnesium on keto: which foods provide them, what common symptoms can and can't tell you on their own, and when to ask a doctor before supplementing.

Illustration for the article: Electrolytes on the ketogenic diet: what to know about sodium, potassium and magnesium

In the early stages of a very low-carb diet, water and sodium losses can increase. This shift can contribute to some symptoms commonly associated with keto flu, but tiredness, headaches, cramps or dizziness can also have other causes and shouldn't be automatically attributed to electrolytes.

There's no dose that's right for everyone

There's no additional electrolyte dose that's right for everyone on a ketogenic diet. Needs depend on overall diet, sweating, physical activity, blood pressure, kidney function, other health conditions and current medication.

For a general reference point (not a target to hit regardless): the World Health Organization recommends that the general adult population keep sodium intake under 2,000mg a day (about 5g of salt). Some clinical programs specialized in ketogenic diets — for example Virta Health, a specific clinical-commercial protocol, not "the literature" as a whole — use, for some patients and under supervision, protocols with higher sodium intakes, mainly for the initial management of symptoms attributed to fluid shifts. These are two different contexts (general population vs. symptom management within a supervised clinical program): they shouldn't be conflated, and neither is automatically "the right number for you" without looking at your specific situation.

The same applies to potassium and magnesium: figures like "3-4g of potassium" or "300-500mg of magnesium" found online often mix total intake (food + any supplement) with the supplement-only amount, which are different things. For magnesium, for example, the Tolerable Upper Intake Level set by the US NIH for the supplement-only portion is 350mg a day for an adult — a value specific to supplementation, not to total magnesium also coming from food.

Food sources

For many people the first step is looking at overall diet and choosing keto-compatible food sources, rather than reaching straight for a supplement:

The actual content depends on the specific food and portion, and following keto doesn't automatically guarantee an adequate intake of these minerals. A supplement isn't automatically necessary: it should be assessed case by case, with particular caution in the presence of illness, persistent symptoms or ongoing medication.

About symptoms: what they can't tell you on their own

Headaches, tiredness, cramps or dizziness can appear for different reasons, including changes in fluids or electrolytes. On their own, though, they don't let you identify which mineral is low, or even confirm that the problem is an electrolyte at all. Palpitations, fainting, confusion, severe weakness or persistent symptoms need a medical evaluation, not an attempt to fix things on your own with salt or supplements — the full picture of signs that need medical attention is in the article on contraindications.

When caution is needed with salt and supplements

If you have kidney or heart disease, high blood pressure, a significant endocrine condition, or take medication that affects fluids and electrolytes, don't start supplements or substantially change your salt intake without talking to whoever manages your treatment. Watch out for salt substitutes too: many contain potassium.

  • ACE inhibitors, ARBs and potassium-sparing diuretics can reduce potassium excretion and favor an increase.
  • Loop and thiazide diuretics can increase potassium loss.
  • Kidney disease and heart failure make it especially important to assess sodium, potassium, magnesium and fluids together.
  • Magnesium supplements can interfere with the absorption of some antibiotics and bisphosphonates; a doctor or pharmacist can tell you if doses need to be spaced apart.

Sources


This article is for informational purposes only and does not replace advice from a doctor or nutritionist.