Skip to content
Protocol

Keto Electrolytes: Sodium, Potassium, Magnesium

Marcus · Performance Coach · July 25, 2026
Keto Electrolytes: Sodium, Potassium, Magnesium

Keto flu isn't a mystery. It's an electrolyte problem. When you cut carbs, your insulin drops, and your kidneys start dumping sodium and water fast. That's why you feel like garbage on day three. Headache, brain fog, cramps, zero energy. Most people white-knuckle through it. You don't have to.

Sodium, potassium and magnesium are the three that matter, and understanding what each one does will get you further than any product will. I've walked a lot of people through their first two weeks of keto and this is the single biggest lever.

One thing to settle before you change anything. Sodium and potassium are the two minerals where the right answer depends on things a web page cannot see. If you take a daily pill for your blood pressure or your heart, a water pill, or anything to do with your kidneys, ask your doctor or your pharmacist before you increase either one. That includes salt substitutes like Lite Salt or No Salt, and it includes electrolyte packets. Some of those medicines already hold potassium in your body, so extra on top is the problem rather than the help. Have the same conversation if a blood test has ever come back with a note about your sodium, your potassium or your kidney function, or if anyone has ever told you to watch your salt. If you're not sure whether that's you, that's a good reason to ask rather than to assume it isn't.

For everyone else, here's what each mineral actually does and what to eat. You'll notice I'm not printing daily milligram targets. The readers most likely to be harmed by a number are the least likely to know the number applies to them, and a range aimed at everybody is not a plan for anybody.

Why keto burns through your electrolytes

On a normal carb diet, high insulin tells your kidneys to hold onto sodium. Keto flips that switch off. Lower insulin means your body flushes sodium, and water follows it out the door.

Lose sodium and you throw potassium and magnesium off balance too. They all work together. That's the whole reason the cramps, fatigue, and headaches show up as a package deal. It's not one mineral. It's the trio.

So the fix is simple. Replace what you're losing. Let's put real numbers on it.

Sodium: The One Most People Under-Eat On Keto

This is the big one, and it's the one everyone's scared of. You've been told salt is the enemy your whole life. On keto, a lot of people who feel awful in week one are eating food they'd have called badly under-seasoned a month ago.

Here's the mechanism, which is more useful than a number. Carbohydrate raises insulin, insulin tells your kidneys to hold on to sodium, and cutting the carbohydrate weakens that signal so more goes out than you're used to. Salt your food until it tastes right to you and expect your taste for it to climb over the first fortnight. If you train hard or sweat a lot you'll want more than someone who doesn't, and your thirst and your taste read that better than my range would.

Food-first sources:

Here's my go-to move. Cup of hot broth in the morning, salt everything you eat, and a pinch of salt in a big water bottle you finish before dinner. That alone gets most beginners into range.

Potassium: Eat It, Don't Dose It

Potassium works hand in hand with sodium, and it's often part of why calves seize up at 2 a.m. It's also the one mineral on this page where I'm not going to give you a target, and I'd rather explain that than have you go looking for the number somewhere else.

Too much potassium and too little potassium both affect heart rhythm, and from the inside they feel the same. That's why over-the-counter potassium pills are capped at 99 mg each, and it's why a target is the wrong tool here: a number invites you to close the gap, and closing a potassium gap with a supplement or a salt substitute is the move that goes wrong. So eat it. The foods below do the job without any arithmetic.

Food-first sources:

Two avocados and a big serving of cooked spinach gets you a long way toward target without any pills. The math doesn't lie. Real food does most of the work here.

Magnesium: The Recovery And Sleep Mineral

Low magnesium can show up as muscle twitches, poor sleep and that wired-but-tired feeling. Plenty of people are already low before they start keto.

This is the one where a supplement often does make sense. How much is right for you depends on what else you take, so ask your pharmacist, who can see your actual list, and buy the smallest bottle first. If you notice nothing after a fortnight, it wasn't your lever.

Food-first sources:

For a supplement, pick magnesium glycinate or citrate. Skip magnesium oxide. It's cheap, poorly absorbed, and it'll send you running to the bathroom. Take it in the evening and it doubles as a sleep aid.

What a normal day actually looks like

Nothing here needs measuring. This is the rhythm I'd suggest to someone starting this week.

The feedback you're looking for is the headache easing, energy coming back and the midnight cramps stopping, over a week or two rather than overnight.

What I'm not going to tell you is to answer feeling off by adding salt. "Feeling off" covers a lot of ground, including a few things that need a doctor today rather than a salt shaker. If what you've got is a racing or skipping heartbeat, dizziness on standing, or weakness that feels new, that's a phone call. If it's a dull afternoon headache in your first fortnight, seasoning your food properly is a reasonable first move.

Powdered electrolyte packets are a fine convenience if you don't want to think about it, and LMNT is the one I've used most. Turn any of them over and read the potassium line before you buy, and if anything in the section at the top of this page sounded like you, that label is the thing to bring to your pharmacist. "Is this one all right for me?" is a question they can answer in about a minute.

If you want your targets dialed to your own body weight and activity level instead of a generic range, run your numbers through the KetoDial calculator. It'll give you personal sodium, potassium, and fat targets so you're not guessing.

The symptoms that aren't a minerals question

Most of what week one throws at you is ordinary and it settles. Three things are not, and they get their own paragraph because they're the ones people try to fix with electrolytes.

A heartbeat that races, flutters or feels like it's skipping. Don't answer this one with potassium. Too much and too little both cause it and they feel identical, so adding more is a coin flip. Ring your doctor and tell them you've recently changed how you eat.

Dizziness or feeling faint on standing, especially if you take anything for blood pressure. This is one of the commoner reasons a medication dose needs adjusting after a diet change. That's a conversation, not a bigger pinch of salt.

Anything with chest pain, breathlessness, confusion or fainting. That's urgent care today. It isn't a nutrition question and this page is not the right place for it.

I'm not a doctor. I've coached people through keto and done it myself, so I know what works in practice. But I'm not your doctor. If you have health issues or take medications, check with someone qualified before changing how you eat or dosing electrolytes. Everything here is based on what works in the field and what research supports. Your mileage may vary.

Ready to dial in your macros?

Free results in 90 seconds. No account needed.

Try the calculator