I spent my first ten days on keto with a constant low-grade headache and a tiredness I could not shake, before I realised the problem had nothing to do with what I was eating and everything to do with what I was not replacing.
Electrolytes on keto are not an optional supplement consideration. They are one of the most functionally important aspects of a well-formulated ketogenic diet, and the failure to manage them adequately is the primary cause of the symptoms that cause most keto beginners to quit in the first two weeks. The headaches, the fatigue, the muscle cramps, the brain fog, the heart palpitations, and the dizziness that collectively get labelled as the keto flu are, in the vast majority of cases, symptoms of electrolyte depletion, not symptoms of a diet that is failing.
This article explains why electrolytes deplete on keto, which three are most critical and why each matters individually, what the specific symptoms of each deficiency look like, exactly how much of each to consume and from which sources, and a simple homemade electrolyte drink recipe that covers the basics in one preparation. Managing electrolytes is the single intervention most likely to transform your experience of early keto from difficult and symptomatic to functional and sustainable.For the broader context of the keto flu and how electrolytes fit into the early adaptation experience, the guide onketo flu symptoms covers the complete picture. And for the full dietary framework that electrolyte management supports, the complete keto diet plan is the foundational reference.
Why Electrolytes on Keto Deplete So Quickly

The electrolyte depletion on keto is not a sign of something going wrong. It is a direct physiological consequence of one of the most beneficial effects of the diet: the reduction in insulin levels.
Insulin is not only a blood glucose regulating hormone. One of its functions in the kidneys is to promote sodium retention. High insulin levels signal the kidneys to hold onto sodium and the water bound to it. When insulin falls rapidly on a ketogenic diet, this retention signal is removed. The kidneys begin excreting sodium at a higher rate. And because water follows sodium, significant fluid loss accompanies the sodium loss, taking potassium and magnesium with it.
This is precisely why the first week of keto typically produces two to four kilograms of rapid weight loss. It is predominantly water being released from glycogen stores and from the reduction in sodium-driven fluid retention. This is not fat loss. It is a healthy metabolic shift. But it is one that depletes the three most critical electrolytes in the body: sodium, potassium, and magnesium.
The NCBI StatPearls clinical reference on the ketogenic diet, updated 2023, identifies electrolyte supplementation as one of the primary clinical management tools for the keto adaptation period, noting that adequate sodium, potassium, and magnesium intake directly mitigates the most common adverse effects reported in the early weeks of ketogenic dieting. [1]
The depletion continues beyond the first week, not at the same rate but as an ongoing characteristic of the diet. A well-formulated ketogenic diet maintains lower insulin levels indefinitely. Lower insulin means the kidneys continue to excrete more sodium than they would on a high-carbohydrate diet. This is why electrolyte management on keto is not just a first-week concern. It is a consistent requirement for the duration of the diet.
Sodium, Potassium, and Magnesium on Keto: Why Each Matters

Sodium: the most urgently needed electrolyte on keto
Sodium is the primary electrolyte lost when insulin falls and the kidneys increase excretion. It is also the electrolyte that most people on keto are actively afraid of consuming more of because decades of public health messaging about salt and blood pressure have instilled a default salt-avoidance behaviour.
On a standard high-carbohydrate diet, reducing sodium is appropriate for many people because insulin-driven sodium retention means the body is already holding more than it needs. On a ketogenic diet, the insulin-driven retention is removed. The same public health sodium limit, typically around 2,300 mg per day, is insufficient for most people on keto who are now excreting significantly more sodium than before.
Clinical guidelines from Virta Health on electrolyte requirements for ketogenic diets recommend 3,000 to 5,000 mg of sodium per day on a well-formulated ketogenic diet, which is substantially higher than standard dietary guidelines but appropriate for the increased renal excretion that lower insulin produces. [2]
Sodium deficiency symptoms on keto: headache (the most common early keto symptom), fatigue, dizziness, brain fog, difficulty concentrating, heart palpitations, nausea, and muscle cramps. All of these are frequently attributed to the diet itself rather than the electrolyte deficiency driving them.
Potassium: the electrolyte most affected by reduced plant food variety
Potassium is excreted alongside sodium when the kidneys increase sodium output. It is also the electrolyte most affected by the reduction in high-potassium foods that typically accompanies keto. Bananas, oranges, potatoes, and most legumes, the primary potassium sources in a standard diet, are all off the menu on keto. Replacing them requires deliberate food choices.
The National Institutes of Health Potassium Fact Sheet for Health Professionals recommends 2,600 mg per day for adult women and 3,400 mg per day for adult men. The Virta Health keto guidelines recommend 3,000 to 4,000 mg per day for people following a ketogenic diet, reflecting the higher excretion rate on the diet. [3]
Potassium deficiency symptoms on keto: muscle weakness and cramping (particularly leg cramps at night), fatigue, constipation, heart palpitations, and in severe cases, cardiac arrhythmia. Leg cramps that wake people up at night are one of the most reported symptoms of inadequate potassium on keto.
Best keto sources of potassium: avocado (one avocado provides approximately 975 mg), spinach (cooked, per 100g provides approximately 540 mg), salmon (per 100g provides approximately 380 mg), broccoli (per 100g approximately 316 mg), mushrooms (per 100g approximately 318 mg), and chicken thigh. Adding two to three avocados per week, eating leafy greens daily, and including salmon regularly covers most of the potassium requirement through food.
Magnesium: the most commonly overlooked electrolyte on keto
Magnesium is involved in over 300 enzymatic reactions in the body, including protein synthesis, muscle and nerve function, blood glucose control, and energy production. It is also the electrolyte most consistently low in the general population even before keto, and the one most depleted by the additional excretion that low-carbohydrate eating produces.
A 2025 narrative review on alkalinising salts in ketogenic therapies published in Exploration of Foods and Foodomics confirmed that magnesium supplementation in ketogenic diet contexts directly reduces muscle cramps, fatigue, and bone demineralisation risk, and improves metabolic stability, particularly in people following the diet for extended periods. [4]
Magnesium deficiency symptoms on keto: muscle cramps and spasms, sleep disturbance, anxiety, irritability, headaches, constipation, and poor exercise tolerance. The Virta Health keto guidelines recommend 300 to 500 mg of elemental magnesium per day, as magnesium is difficult to obtain in adequate quantities from food alone on keto.
Best forms of magnesium for absorption: magnesium glycinate (best tolerated, causes least digestive upset), magnesium malate (good for energy and muscle function), magnesium citrate (widely available, mild laxative effect at higher doses). Avoid magnesium oxide which has very poor bioavailability.
Best keto food sources of magnesium: pumpkin seeds (per 30g provides approximately 150 mg), almonds (per 30g provides approximately 77 mg), spinach (cooked per 100g provides approximately 87 mg), avocado (one medium avocado provides approximately 58 mg), and dark chocolate at 85 percent or above (per 30g provides approximately 65 mg).
Keto Electrolyte Imbalance Symptoms: How to Recognise Them
Most symptoms of electrolyte imbalance on keto appear within the first three to seven days of starting the diet, coinciding with the period of most rapid glycogen depletion and most significant fluid and electrolyte loss. However, they can also develop at any point during keto if electrolyte intake has been consistently insufficient.
| Symptom | Most likely electrolyte cause | Typical severity | Fix |
| Headache | Sodium deficiency (most common) | Mild to moderate | Add 1/2 to 1 tsp sea salt to a glass of water immediately |
| Fatigue and low energy | Sodium or magnesium deficiency | Mild to significant | Increase sodium intake and add magnesium supplement |
| Muscle cramps (legs at night) | Potassium and magnesium deficiency | Mild to severe | Eat avocado and leafy greens; add magnesium glycinate supplement |
| Brain fog and poor concentration | Sodium deficiency | Mild to moderate | Salt food more aggressively; drink electrolyte water |
| Heart palpitations | Sodium, potassium, or magnesium | Moderate; see GP if persistent | Address all three electrolytes immediately; review with GP if ongoing |
| Dizziness on standing | Sodium deficiency causing low blood volume | Mild | Increase sodium intake; drink more water |
| Constipation | Magnesium deficiency and reduced fibre | Mild to moderate | Magnesium citrate supplement; increase vegetable variety |
| Irritability and anxiety | Magnesium deficiency | Mild | Add magnesium glycinate; reduce caffeine temporarily |
| Sleep disturbance | Magnesium deficiency | Mild to moderate | Take magnesium glycinate 30 to 60 minutes before bed |
| Poor exercise performance | All three electrolytes | Mild to significant | Electrolyte drink before and during exercise; increase food sources |
How to Replenish Electrolytes on Keto: Food First, Supplement Second

The food-first approach to electrolytes on keto
The most effective and sustainable electrolyte strategy for keto is to build your daily meals around foods that are naturally high in all three minerals, and to supplement only what food cannot adequately cover. The supplement-first approach, which many keto beginners take by buying an electrolyte supplement on day one, is less effective because it does not address the root cause of depletion and can create a dependency on products rather than a fundamental improvement in diet quality.
| Electrolyte | Daily target on keto | Best food sources | When to supplement |
| Sodium | 3,000 to 5,000 mg | Sea salt (1/4 tsp = 575mg), broth, tinned fish in brine, olives, pickles | Add 1/4 to 1/2 tsp sea salt to water twice daily if symptomatic |
| Potassium | 3,000 to 4,000 mg | Avocado (975mg each), cooked spinach (540mg/100g), salmon (380mg/100g), mushrooms | Only supplement under GP guidance; high-dose potassium supplements carry risks |
| Magnesium | 300 to 500 mg elemental | Pumpkin seeds (150mg/30g), almonds (77mg/30g), spinach (87mg/100g cooked) | Magnesium glycinate 200 to 400mg daily; especially before bed for sleep |
| Important: potassium supplementation warningHigh-dose potassium supplements above 99mg per tablet are tightly regulated in many countries because excess potassium can cause cardiac arrhythmia. Do not take high-dose potassium supplements without GP guidance. Instead, get potassium from food sources: avocado, leafy greens, salmon, and mushrooms provide sufficient potassium for most people on keto without the risk of oversupplementation. |
Keto Electrolyte Drink Recipe: Simple, Effective, Zero Cost

Commercial keto electrolyte drinks and powders range from good to unnecessary, and many contain sugar alcohols, artificial sweeteners, or food colouring that some people prefer to avoid. The most effective keto electrolyte drink is one you can make at home in under two minutes from standard kitchen ingredients for a few pence per serving.
| Basic keto electrolyte drink recipe250 to 500ml water (still or sparkling)1/4 teaspoon sea salt or pink Himalayan salt (approximately 575mg sodium)1/8 teaspoon cream of tartar (approximately 500mg potassium)Juice of half a lemon or lime (approximately 5mg potassium, adds flavour)Stevia or a small amount of erythritol to taste if desired (optional)Stir or shake together. Drink 1 to 2 servings per day, particularly in the first two weeks of keto and after exercise.Note: This drink addresses sodium and potassium. Magnesium is best supplemented separately through a magnesium glycinate or malate supplement rather than added to a drink. |
| Upgraded keto electrolyte drink (for active people or heavy exercisers)500ml water (still or sparkling)1/2 teaspoon sea salt (approximately 1,150mg sodium)1/4 teaspoon cream of tartar (approximately 500mg potassium)1 tablespoon apple cider vinegar (adds electrolytes, supports digestion)Juice of one lemonStevia to tasteDrink before and during exercise, or any time symptoms of electrolyte deficiency are present. |
Best Electrolytes for Keto Diet: What to Look For in a Commercial Product
Commercial keto electrolyte supplements vary significantly in quality, value for money, and ingredient transparency. If you prefer a commercial product over the homemade version, here is what to look for:
| What to look for | What to avoid | Why it matters |
| Sodium content of at least 500mg per serving | Products with under 100mg sodium per serving | Sodium is the most depleted electrolyte on keto and must be the primary content |
| Potassium content of 200 to 400mg per serving | High-dose potassium supplements above 500mg per serving | Adequate potassium replacement without oversupplementation risk |
| Magnesium content of 50 to 200mg per serving | Magnesium oxide as the magnesium source | Oxide form has poor absorption; glycinate, malate or citrate absorb much better |
| No added sugar or maltodextrin | Products listing dextrose, glucose syrup, or maltodextrin | Added carbohydrates will disrupt ketosis even in small amounts |
| Minimal artificial sweeteners | Sucralose or acesulfame K in high amounts | Some people find artificial sweeteners trigger insulin response or gut discomfort |
| Transparent labelling showing elemental amounts | Proprietary blends without disclosed amounts | You cannot assess whether a product is effective if the amounts are not listed |
For beginners who want a commercial option, LMNT, Ultima, and Precision Hydration are commonly recommended by keto practitioners for their transparent sodium content and absence of added sugars. These are not endorsements. They are examples of the category that meets the criteria above. Always check the current label formulation before buying, as manufacturers change recipes.
Frequently Asked Questions
How do I know if I need more electrolytes on keto?
The most reliable indicators are symptoms: headaches, fatigue, muscle cramps, heart palpitations, and brain fog in the first two to four weeks of keto are almost always electrolyte-related rather than signs of a deeper problem. The practical test is to increase sodium intake, typically by adding a quarter to half a teaspoon of sea salt to a glass of water and drinking it, and observe whether symptoms improve within 30 to 60 minutes. If a headache clears, or fatigue lifts, or a muscle cramp resolves, that is strong evidence that sodium was the primary deficiency. Address the electrolyte and the symptom typically resolves faster than most people expect.
Can you get enough electrolytes from food alone on keto?
For sodium and potassium, yes, with deliberate food choices and liberal salting. For magnesium, getting adequate amounts from food alone on keto is challenging for most people because the highest magnesium food sources such as beans, lentils, and whole grains are not part of the ketogenic diet. Pumpkin seeds, almonds, and leafy greens provide meaningful magnesium but typically cover 40 to 60 percent of the daily requirement at normal eating quantities. A magnesium glycinate supplement of 200 to 400mg per day covers the gap reliably and is the one supplement most keto practitioners consider worth taking consistently.
How long do electrolyte issues last on keto?
The most acute electrolyte depletion occurs in the first one to three weeks of keto, coinciding with the period of most significant glycogen depletion and fluid loss. Once the body has fully depleted glycogen stores, settled into fat adaptation, and stabilised at a new lower fluid balance, the rate of electrolyte loss slows. Most people find that after four to six weeks on keto, aggressive electrolyte supplementation is no longer needed, and that a consistent diet with liberal salting, regular avocado and leafy greens, and a daily magnesium supplement is sufficient for ongoing electrolyte balance. The electrolyte requirement never disappears entirely on keto, but it stabilises significantly after the initial adaptation period.
Is it possible to take too many electrolytes on keto?
Yes, though this is less common than deficiency. Excessive sodium intake above 7,000 to 8,000 mg per day can raise blood pressure and cause water retention. High-dose potassium supplementation, particularly from high-concentration supplements rather than food, can cause cardiac arrhythmia. Very high magnesium supplementation causes diarrhoea, which is also the method by which magnesium citrate is used medically as a laxative. The practical risks of oversupplementation are much lower than the risks of deficiency, but they are real. Staying within the recommended ranges above and getting as much as possible from food sources rather than supplements is the safest approach.
Should I take electrolytes before, during, or after exercise on keto?
Exercise on keto accelerates electrolyte loss through sweat on top of the baseline keto-driven excretion. For exercise sessions under 45 minutes at moderate intensity, drinking the basic electrolyte drink one to two hours before is usually sufficient. For longer or more intense sessions, carrying the electrolyte drink to consume during exercise, particularly in the first four to six weeks of keto before fat adaptation is complete, helps maintain performance and prevents the acute fatigue and cramping that depleted electrolytes cause during exercise. After exercise, prioritising a potassium-rich food alongside the electrolyte drink, such as a meal with salmon and spinach or half an avocado, supports recovery alongside fluid and sodium replenishment.

Get Electrolytes Right and Keto Becomes a Different Experience
The experience of the first two weeks on keto is almost entirely determined by how well electrolytes are managed. Most people who give up on keto in the first two weeks quit because of symptoms that are entirely preventable: headaches from sodium deficiency, leg cramps from potassium and magnesium deficiency, fatigue from all three, and brain fog that clears within hours of drinking salted water. These are not signs that keto is wrong for you. They are signs that the adaptation process needs nutritional support to proceed without unnecessary discomfort.
Salt your food generously, eat avocado and leafy greens daily, add a magnesium glycinate supplement before bed, and drink electrolyte water when symptomatic. These four habits cover the electrolyte requirement for most people on keto without any specialist supplement or complex routine. Build them into your approach from day one rather than waiting to feel the symptoms and then reacting.
For a complete approach to the early keto adaptation period beyond electrolytes, the guide on keto flu symptoms covers every symptom and its specific fix. For how to structure your overall nutrition around these electrolyte-rich foods, the keto food list and keto pantry essentials guide both cover the full dietary picture.
References
All external sources cited in this article are peer-reviewed studies, established medical references, or clinical guidelines from recognised institutions.
1. Masood W, Annamaraju P, Khan Suheb MZ, et al. Ketogenic Diet. NCBI StatPearls, Updated 2023
2. Volek JS, Phinney SD. Sodium, potassium and magnesium requirements for a well-formulated ketogenic diet. Virta Health Clinical Guidelines, 2023
3. National Institutes of Health. Potassium Fact Sheet for Health Professionals. NIH Office of Dietary Supplements, 2022
4. Various authors. Alkalinizing salts in ketogenic diet therapies: a narrative review with clinical recommendations for metabolic health and acid-base balance. Exploration of Foods and Foodomics, 2025