Foundations

Electrolytes and Keto Flu 101

What the keto flu is, why low insulin makes you lose sodium and water, the sodium, potassium, and magnesium targets that prevent it, and the foods that get you there.

By MeKeto Editorial · Last updated October 2026

A glass of lemon water beside sea salt, avocado, spinach and pumpkin seeds

What the keto flu really is

The keto flu is the bundle of symptoms some people hit in the first week of cutting carbs: headache, fatigue, brain fog, irritability, muscle cramps, and a lightheaded feeling when you stand up. It can feel like the start of a head cold. It is not an infection, and it is not a sign that keto is wrong for you. It is an electrolyte problem, and electrolytes are the fix.

The good news is that it is largely preventable. People who load up on sodium and minerals from day one often skip the keto flu entirely. The ones who get hit hardest are usually eating clean, drinking lots of plain water, and getting almost no salt, which is exactly the combination that drains electrolytes fastest. Understanding why explains the whole fix.

Why low insulin makes you lose sodium and water

When you eat carbs, insulin rises. One of insulin's lesser-known jobs is telling your kidneys to hold on to sodium. Cut carbs, and insulin falls, and that signal reverses: your kidneys start excreting sodium instead of keeping it. Sodium pulls water along with it, so you lose both at once. This is the real engine behind the dramatic first-week weight drop.

There is a second source of water loss happening at the same time. Your body stores carbohydrate as glycogen in your muscles and liver, and every gram of glycogen is bound to three to four grams of water. As you burn through 400 to 500g of stored glycogen in the early days, the water it was holding is released too. Between the glycogen water and the sodium your kidneys are dumping, you can shed several pounds of fluid fast. The catch is that you lose potassium and magnesium in the rush as well, and that mineral shortfall is what produces the headaches, cramps, and fatigue.

The three minerals that matter, and your targets

Three electrolytes do the heavy lifting on keto. Sodium is the most important and the most neglected. On low carb you excrete far more of it, so most keto sources suggest aiming for roughly 3,000 to 5,000mg of sodium a day, which is well above standard advice. That is about 1.5 to 2.5 teaspoons of salt across the day, from salting your food, sipping broth, and adding a pinch to your water. If you have high blood pressure or kidney concerns, set your sodium target with your doctor rather than from a general guide.

Potassium works as sodium's partner, and a common target is in the range of 3,000 to 4,700mg a day in total, almost all of it reachable from food. Magnesium is the third, at roughly 300 to 500mg a day in total from food and any supplement. It is the one mineral that is genuinely hard to get from keto-friendly food in full amounts, which is why a supplement such as magnesium glycinate or citrate is a reasonable addition; keep the supplement itself at or below 350mg a day, the NIH upper limit for supplemental magnesium. If you have kidney disease, or take diuretics, ACE inhibitors, or ARBs, set potassium and magnesium with your doctor. To estimate your own numbers, the Electrolyte Calculator turns your weight and carb level into daily sodium, potassium, and magnesium targets.

Where to get them from food

Sodium is the easiest to fix: salt your food generously, drink a cup or two of bouillon or bone broth, and add a small pinch of salt to a glass of water if you feel foggy. For potassium, the standouts are avocado, which carries around 700mg in a medium fruit, plus leafy greens like spinach, along with salmon, mushrooms, and zucchini. For magnesium, lean on pumpkin seeds, spinach, almonds, dark chocolate that is 85 percent or higher, and mackerel.

You can find the exact mineral content of these staples in the keto food database. A practical daily habit covers most of it: eat an avocado, a big serving of leafy greens, and a fatty fish or a handful of seeds, then salt everything to taste. That combination, plus a magnesium supplement, gets the average person close to all three targets without much effort.

The first two weeks: a timeline

Days one and two usually feel fine, because you are running on the glycogen still in storage. Days three through five are the classic keto flu window, when glycogen is nearly gone, sodium loss is peaking, and symptoms show up if your electrolytes are low. This is exactly when staying ahead on salt and minerals pays off most. Drink to thirst here rather than forcing down plain water, since flooding water without sodium can wash out even more of it and make things worse.

By the end of week one most people feel noticeably better, and through the second week energy usually climbs as the body adapts to running on fat and ketones. For most people the rough patch is short, often two to five days and rarely beyond two weeks. If symptoms are severe, drag on much longer, or include a racing or irregular heartbeat, that is worth a conversation with a doctor, not something to push through. Once you are through it, a good next step is to confirm you are actually in ketosis, which the guide on how to test for ketosis walks through. New to all of this? The keto for beginners guide covers the rest of the starting line.

Frequently asked questions

The keto flu is a cluster of temporary symptoms, including headache, fatigue, brain fog, irritability, muscle cramps, and lightheadedness, that some people get in the first week of cutting carbs. It is not an infection. It is mostly your body shedding sodium and water as insulin falls, which throws your electrolytes out of balance.

Replace electrolytes. Add about 3,000 to 5,000mg of sodium a day from salt and broth, eat potassium-rich foods like avocado and leafy greens, and consider a magnesium supplement. Drink to thirst rather than overdrinking, since flooding plain water can wash out more sodium. Most people feel better within a day or two of getting salt back up.

Most keto sources suggest roughly 3,000 to 5,000mg of sodium per day, which is higher than standard advice because you excrete more of it on low carb. That is about 1.5 to 2.5 teaspoons of salt across the day from food, broth, and salted water. People with high blood pressure or kidney issues should clear sodium targets with their doctor first.

Your body stores carbohydrate as glycogen, and every gram of glycogen is bound to three to four grams of water. When you cut carbs, you burn through 400 to 500g of glycogen and release the water with it. Lower insulin also tells your kidneys to dump sodium, and sodium pulls still more water out. That is the whoosh you see on the scale early on.

No. Plain table salt, a cup of broth, and potassium-rich whole foods cover most of what you need. Magnesium is the one mineral hard to get from food in keto-friendly amounts, so a supplement like magnesium glycinate or citrate is reasonable. Sugar-free electrolyte powders are convenient but optional, not required.

For most people it is short, often two to five days, and rarely more than a week or two. Staying on top of sodium, potassium, and magnesium from day one prevents the worst of it. If symptoms are severe, drag on past two weeks, or include a racing heartbeat, check in with a doctor.

This article is for general information only and is not medical advice. Keto is not right for everyone. If you are pregnant, take medication, or have a health condition, talk to your doctor before changing how you eat. See our medical disclaimer for more.

References

  1. Phinney SD, Volek JS. The Art and Science of Low Carbohydrate Living. Beyond Obesity LLC, 2011. Protein, sodium and electrolyte guidance for a well-formulated ketogenic diet.
  2. Virta Health. Managing Potassium and Sodium as Part of a Well-Formulated Ketogenic Diet.
  3. National Institutes of Health, Office of Dietary Supplements. Magnesium Fact Sheet for Health Professionals.
  4. National Institutes of Health, Office of Dietary Supplements. Potassium Fact Sheet for Health Professionals.

Related