When you cut carbs drastically, your kidneys start flushing out more sodium, and potassium and magnesium follow close behind. This is the main driver behind “keto flu,” that stretch of headaches, fatigue, and muscle cramps that hits in the first week or two. Replacing these three electrolytes through food and, when needed, supplements is the single most effective way to feel good on a ketogenic diet.
Why Keto Drains Your Electrolytes
Carbohydrates cause your body to hold onto water and sodium. When you stop eating them, insulin levels drop, and your kidneys rapidly excrete sodium in a process called natriuresis. This initial sodium dump is why you lose several pounds of water weight in the first few days of keto.
The problem cascades from there. As sodium drops, your body releases aldosterone, a hormone that tells the kidneys to conserve sodium. The trade-off is that the kidneys start dumping potassium instead. Meanwhile, magnesium losses increase through the same urinary pathway. You’re losing all three major electrolytes at once, and if you’re eating mostly whole foods (no processed snacks loaded with salt), you’re not replacing them automatically.
The Three Electrolytes That Matter
Sodium
Sodium is the biggest one. Symptoms of low sodium on keto include dizziness, lightheadedness when standing up, fatigue, headache, and constipation. These overlap almost perfectly with classic keto flu symptoms, and for most people, simply adding more salt fixes the majority of them.
Standard dietary guidelines recommend staying under 2,300 mg of sodium per day. Keto-focused practitioners typically suggest 2,000 to 5,000 mg daily because of the increased losses. If you’re active and sweating regularly, you’ll land toward the higher end of that range. The easiest approach: salt your food liberally and sip salted broth or a homemade electrolyte drink throughout the day.
Potassium
Potassium deficiency shows up differently. You’ll notice muscle twitches, cramps, general weakness, constipation, and in more significant cases, irregular heartbeats. Most adults need around 2,600 to 3,400 mg of potassium daily, and getting there on keto requires some intention since you’ve cut out bananas, potatoes, and beans.
Over-the-counter potassium supplements are capped at 99 mg per serving, which is only about 2% of your daily needs. The FDA limits this because higher-dose potassium pills have been linked to small-bowel lesions. That means supplements alone won’t get you there. Food has to do the heavy lifting, and you can top off the rest with potassium chloride powder (sold as “lite salt” or “no-salt” at grocery stores), which delivers potassium in much larger amounts per serving.
Magnesium
Magnesium deficiency overlaps with potassium deficiency: muscle cramps, weakness, and twitching. It can also cause trouble sleeping and a general sense of restlessness. Unlike potassium, magnesium is relatively easy to supplement. The upper limit for supplemental magnesium is 350 mg per day in the U.S. and 250 mg per day in Europe, and most people on keto do well with 200 to 400 mg daily from a supplement on top of what they get from food.
The form of magnesium matters. Organic forms like magnesium citrate and magnesium glycinate are significantly better absorbed than magnesium oxide. In testing, organic magnesium salts raised blood levels of magnesium roughly 50% more effectively than oxide. Magnesium oxide is the cheapest option on shelves, but much of it passes through unabsorbed, and it’s more likely to cause loose stools. Glycinate tends to be the gentlest on the stomach, and citrate is a good middle ground in both price and absorption.
Best Keto-Friendly Foods for Electrolytes
You can cover a surprising amount of your electrolyte needs through food choices alone. For potassium, the best low-carb options include:
- Avocado: about 364 mg of potassium per half
- Beet greens: 1,309 mg per cup, cooked
- Portobello mushrooms: 529 mg per cup, cooked
- Salmon, halibut, mackerel, and trout: over 400 mg per 3-ounce fillet
- Clams: 1,193 mg in 20 small clams
For magnesium, pumpkin seeds, spinach, Swiss chard, and dark chocolate (85% or higher) are all keto-friendly and rich in magnesium. A single ounce of pumpkin seeds delivers about 150 mg.
For sodium, the easiest sources are sea salt, pink Himalayan salt, bone broth, pickles, olives, and aged cheeses. If you’re eating mostly home-cooked whole foods, you’ll likely need to add salt deliberately rather than relying on what’s already in your meals.
How to Make a Simple Electrolyte Drink
A homemade electrolyte drink (often called “ketoade”) is the most practical way to keep levels topped off, especially in the first few weeks. A basic recipe uses 5 cups of water, a quarter teaspoon of sea salt or pink Himalayan salt, and half a teaspoon of potassium chloride (lite salt). You can squeeze in some lemon or lime juice and add a few drops of liquid stevia if you want flavor.
Sip this throughout the day rather than drinking it all at once. Spacing it out improves absorption and reduces the chance of stomach discomfort. If the saltiness is too strong, cut the sea salt to an eighth of a teaspoon and adjust upward over a few days as your palate adapts.
Commercial electrolyte powders and tablets designed for keto also work, but check the labels. Many contain very little actual sodium or potassium and rely on flavoring and marketing. Compare the milligrams on the label to what you actually need, and you’ll often find that a packet of electrolyte powder delivers less than a pinch of lite salt would.
How Needs Change Over Time
Electrolyte losses are most dramatic in the first one to four weeks, when your body is transitioning away from burning carbohydrates. During this window, being proactive about supplementation makes the biggest difference. Most keto flu symptoms are temporary and resolve as the body adapts to using fat and ketones for fuel.
Once you’re fully adapted, which typically takes four to eight weeks, your kidneys become more efficient at retaining sodium and the aldosterone-driven potassium losses slow down. Many people find they can ease off supplementation at this point. If you already feel well on keto and aren’t experiencing cramps, fatigue, or dizziness, you may not need to add anything beyond eating electrolyte-rich foods and salting your meals normally.
That said, certain situations will spike your needs again regardless of how adapted you are: heavy exercise, hot weather, fasting, illness, or alcohol consumption. On days when you sweat more than usual or eat less than usual, increase your salt and fluid intake accordingly.
Common Mistakes to Avoid
Drinking large amounts of plain water without electrolytes can actually make things worse by diluting what sodium you have left. If you’re drinking a gallon of water a day and still feeling terrible, the issue is likely too little salt, not too little water.
Another mistake is relying solely on potassium supplements. At 99 mg per pill, you’d need over 30 capsules a day to meet your needs. That’s not a realistic strategy, and high-dose supplemental potassium carries real risks. Severe hyperkalemia can cause dangerous heart rhythm changes. Food-based potassium (from avocados, leafy greens, and fish) is both safer and more effective, with potassium chloride powder as a measured add-on.
Finally, don’t assume that all your symptoms are electrolyte-related. If you’re consistently getting enough sodium, potassium, and magnesium and still feel off after several weeks, other factors like inadequate calorie intake, poor sleep, or too-rapid fat adaptation could be at play.

