When you cut carbs low enough to enter ketosis, your kidneys start flushing sodium at a much faster rate than usual. This pulls potassium and magnesium out with it, creating a triple electrolyte deficit that explains most of what people call “keto flu.” The fix is straightforward: deliberately replace all three minerals through food, drinks, and targeted supplements.
Why Keto Drains Your Electrolytes
Insulin does more than regulate blood sugar. It also signals your kidneys to hold onto sodium. When carb intake drops and insulin levels fall, that signal weakens, and your kidneys begin excreting sodium rapidly. Water follows sodium out, which is why you lose several pounds of water weight in the first week of keto. That water loss carries potassium and magnesium along with it.
This isn’t a one-time adjustment. As long as you’re eating very low carb, your baseline insulin stays lower, which means your kidneys continue to excrete electrolytes faster than they would on a standard diet. You need to actively replace them for as long as you stay in ketosis, not just during the first week.
The Three Electrolytes That Matter Most
Sodium
Sodium is the biggest and most immediate loss. A typical ketogenic meal plan provides only about 1,273 mg of sodium per day, well below the 2,300 mg general guideline. Factor in the extra kidney excretion, and many keto dieters need 3,000 to 5,000 mg daily. That sounds like a lot, but it’s easy to reach when you’re intentional about it. Salting your food generously, drinking broth, and sipping salted water throughout the day all help. One half-teaspoon of table salt contains roughly 1,150 mg of sodium.
Potassium
Most adults need around 2,600 to 3,400 mg of potassium daily, and keto-friendly whole foods can get you there. Half an avocado delivers about 364 mg. A cup of cooked spinach packs 839 mg. A 3-ounce salmon filet provides over 400 mg. Even some squashes work in moderate portions: half a cup of cooked butternut squash has 582 mg of potassium with only about 8 grams of net carbs, which can fit into a well-planned keto day.
A potassium-based salt substitute (like Morton Lite Salt) is another useful tool. A quarter teaspoon gives you about 350 mg of potassium plus 290 mg of sodium, making it an efficient two-for-one addition to water or food.
Magnesium
The recommended daily intake for magnesium is 310 to 420 mg for adults. Because keto increases excretion, supplementing with 250 to 400 mg on top of what you get from food is a common approach. Low magnesium is the usual culprit behind muscle cramps, poor sleep, and that persistent “brain fog” feeling.
Not all magnesium supplements are equal. Magnesium glycinate is well absorbed and gentle on the stomach, making it the best general choice. Magnesium citrate absorbs well too, but it can have a laxative effect, which is helpful if constipation is an issue and a problem if it isn’t. Magnesium oxide is cheap and widely available but poorly absorbed, so most of it passes through your digestive system without doing much. Magnesium malate is another solid option, particularly if muscle soreness is your main complaint.
A Simple Homemade Electrolyte Drink
You don’t need expensive keto electrolyte products. A basic recipe from Virta Health covers all three minerals in a single glass:
- 16 oz water
- ½ teaspoon salt (about 1,150 mg sodium)
- ¼ teaspoon Lite Salt (about 350 mg potassium and 290 mg sodium)
- 1 teaspoon magnesium powder (about 160 mg magnesium)
- 1 tablespoon lemon juice
- A dash of stevia (optional, for taste)
Sipping one or two of these throughout the day, combined with electrolyte-rich foods at meals, covers most people’s needs. The lemon juice makes it palatable. Without it, you’re drinking salty water, which is functional but not something you’ll look forward to.
Keto-Friendly Foods High in Electrolytes
Building electrolytes into your meals is more sustainable than relying on supplements alone. For sodium, bone broth is a staple: a cup typically has 400 to 500 mg, and it’s easy to sip between meals. Cheese, pickles, olives, and salted nuts all contribute meaningful amounts. For potassium, avocados, leafy greens (spinach, Swiss chard), salmon, and mushrooms are your best options on keto. For magnesium, look to pumpkin seeds, almonds, dark chocolate (85% or higher), and spinach, which pulls double duty as both a potassium and magnesium source.
Tinned fish with the bones, like sardines and canned salmon, also provide calcium, which matters if you’re not eating much dairy. Eggs are another easy source. If you eat dairy, hard cheeses and full-fat yogurt (in moderation for carbs) round things out nicely.
Water Intake and Electrolyte Balance
There’s a counterintuitive trap with hydration on keto. Drinking large amounts of plain water without replacing electrolytes actually makes things worse, because you flush out even more sodium. The result is a cycle where you feel thirsty, drink more water, lose more electrolytes, and feel worse. Always pair your water with some source of electrolytes, whether that’s a pinch of salt in your water bottle, an electrolyte drink, or salty food alongside your glass of water.
The Keto Flu Timeline
Electrolyte-related symptoms typically hit hardest in the first week of keto. Headaches, fatigue, muscle cramps, irritability, and brain fog are the most common complaints. Research on consumer reports of keto flu found that symptoms peaked in the first week and tapered off after four weeks, with a median resolution time of about 4.5 days for people who actively addressed them.
If you start supplementing electrolytes from day one, you can significantly reduce or even avoid these symptoms entirely. Many people who report a brutal “keto flu” simply weren’t replacing what their kidneys were dumping. Headaches from ketosis typically last one day to one week. If fatigue, dark urine, or muscle cramps persist beyond the first few weeks, that’s a sign your electrolyte strategy needs adjusting or something else is going on.
Common Mistakes to Avoid
The most frequent mistake is treating electrolyte replacement as a first-week-only fix. Your kidneys don’t stop excreting extra sodium after you’re “adapted.” The need is ongoing. Another common error is supplementing only one mineral. Sodium, potassium, and magnesium work together. Flooding your body with sodium while ignoring potassium can actually worsen imbalances.
Relying solely on commercial “keto electrolyte” products is also tricky. Many contain surprisingly small amounts of each mineral, sometimes just 100 to 200 mg of sodium per serving, which barely makes a dent. Check the label and compare it to your actual needs. A half-teaspoon of salt in water is often more effective and costs almost nothing.