Skip to content
Copper Sun Companion Series

Keto electrolytes: sodium, potassium, and magnesium

July 9, 2026 · 4 min read

Most keto-flu symptoms — headaches, fatigue, muscle cramps, lightheadedness — are not ketosis itself. They're electrolyte depletion, and they're fixable.

Here's why it happens and what to do about it.

Why keto depletes electrolytes

When carbohydrate drops, insulin drops too. One of insulin's roles is to signal the kidneys to retain sodium. When insulin falls, the kidneys stop holding sodium as tightly and excrete more of it. Sodium loss then pulls water with it (which is why early keto weight loss is largely water), and potassium and magnesium follow behind sodium in the excretion process.

The result: without adding electrolytes back, you feel it — usually within the first few days. This is the mechanism behind most of what people call the keto flu.

Sodium

Sodium is the one that matters most and the easiest to address. The typical advice is to add 1–2g of extra sodium per day on keto above what you'd otherwise eat — this is approximately what the kidneys are excreting more of.

How to get it:

  • Salt your food more than you usually would
  • Drink bone broth or a cup of salted broth (the original electrolyte drink)
  • Electrolyte drinks without sugar — look for ones with actual sodium content, not just branding
  • A pinch of salt in a glass of water works in a pinch

Most keto eaters don't need to count milligrams. If you're getting cramps, fatigue, or headaches in the first week, the first thing to try is adding more salt.

Potassium

Potassium works closely with sodium to regulate fluid balance, nerve function, and muscle contractions. Keto accelerates its loss as sodium goes, and low potassium shows up as muscle cramps and fatigue.

Keto-friendly potassium sources:

  • Avocado (one of the highest-potassium keto foods)
  • Salmon and other fatty fish
  • Spinach and other leafy greens
  • Zucchini, broccoli, and asparagus
  • Nuts (especially almonds)

A caution on supplements: potassium supplements require care. Very high potassium intake can cause dangerous heart arrhythmia, and the risk is higher with certain conditions (kidney disease, diabetes) and medications (ACE inhibitors, potassium-sparing diuretics). Don't take high-dose potassium supplements without checking with your doctor. Getting potassium from food is safer and usually sufficient.

Magnesium

Magnesium is the electrolyte most people on keto don't get enough of, even with a good diet. Deficiency shows up as muscle cramps (especially leg cramps at night), poor sleep, and general fatigue.

Keto-friendly magnesium sources:

  • Almonds, Brazil nuts, pumpkin seeds
  • Spinach and dark leafy greens
  • Salmon and mackerel
  • Dark chocolate (in small amounts with low-carb sweetener)

Supplementing: magnesium glycinate or magnesium citrate are the most absorbed forms. A common dose is 200–400mg before bed, which also tends to improve sleep. Magnesium oxide is cheap but poorly absorbed; it's mostly what you find in cheap supplements. This is general information — ask your doctor if you have kidney disease or take medications that affect magnesium levels.

The practical routine

The simplest version that covers most people:

  1. Salt food freely. This is the highest-impact move.
  2. Drink broth once a day in the first few weeks, or when you feel off.
  3. Eat avocado, leafy greens, and salmon regularly for potassium.
  4. Supplement magnesium glycinate at 200–300mg before bed.

If you're several weeks into keto and still getting cramps or fatigue, electrolytes are the first thing to revisit before concluding something else is wrong.

FAQ

Do I need electrolyte supplements on keto? Sodium and magnesium are commonly needed, especially in the first weeks. Potassium is usually covered by food if you're eating avocados, fish, and leafy greens. Magnesium is the one most people benefit from supplementing.

How much sodium should I add on keto? A common guideline is 1–2g extra per day, but individual needs vary. If you're getting headaches or fatigue in the first week, more salt is the first thing to try. This is general information, not medical advice.

What's the best electrolyte drink for keto? One with actual sodium and ideally some potassium, without added sugar. Many sports drinks are disqualifying because of the sugar. Look for powders or tablets that list the electrolyte content and have near-zero carbs.

Will electrolytes kick me out of ketosis? No. Sodium, potassium, and magnesium are minerals, not carbohydrates.

Should I see a doctor about electrolytes? If you take blood pressure medication, ACE inhibitors, diuretics, or medication for kidney or heart conditions — yes, before supplementing. Electrolyte levels interact with several classes of drugs. This is general information, not medical advice.