Skip to content
Home / Blog

Electrolytes on Keto: A Beginner's Guide to Sodium, Potassium and Magnesium

A plate with half an avocado, leafy greens, almonds and seeds, beside a salt shaker and a glass of water with lemon

If you have started keto in the last few weeks, you may have heard the word "electrolytes" more often than you expected. Someone in a group chat swears by salty broth. A friend says magnesium changed their sleep. Another warns you to be careful. It can feel like a lot of chemistry for something that was supposed to be about food.

Here is the good news. Electrolytes are not mysterious, and for most healthy adults they are something you can look after mostly from the kitchen. They are a few minerals that help your body hold the right amount of water, send nerve signals and keep muscles, including the heart, working in rhythm.

This guide walks through the three you will hear about most on keto, sodium, potassium and magnesium. We will look at why the first weeks can shift your needs, which everyday foods bring them in, and which signals mean it is time to rest, eat or call a doctor.

Key takeaways

  • Electrolytes are minerals such as sodium, potassium and magnesium that carry a small electrical charge and help balance fluids, nerves and muscles.
  • In the first weeks of keto the body tends to let go of more water and sodium, so some people feel tired, headachy or crampy for a while.
  • For most healthy adults, food comes first: salting meals to taste, plus greens, avocado, nuts, seeds and fish, usually covers a lot of ground.
  • More is not always better. Too much potassium or magnesium from supplements can be harmful, especially with kidney or heart conditions.
  • Needs vary from person to person. If you have a medical condition or take medication, check with your doctor before changing salt or adding supplements.

What electrolytes do, in plain words

Think of your body as a house with lots of small rooms, the cells. Water moves in and out of those rooms all day. Electrolytes are part of how the body decides where the water goes, and they carry the tiny electrical signals that tell a muscle to contract or a nerve to fire.

Cleveland Clinic lists the main ones as sodium, chloride, potassium, calcium, magnesium, phosphate and bicarbonate. On keto, three of them tend to get the most attention.

Sodium

Sodium mostly lives outside the cells and helps decide how much water the body keeps. Salt in food is the main source. When sodium runs low, some people feel weak, light-headed or foggy.

Potassium

Potassium mostly lives inside the cells. It works together with sodium to keep the balance steady, and it matters for muscles and heart rhythm. Many of the richest sources are fruits and starchy vegetables, which is one reason it can quietly drop on a low-carb menu.

Magnesium

Magnesium helps turn food into energy and supports muscles and nerves. It is found in leafy greens, nuts and seeds. Plenty of people, keto or not, eat less of it than recommended.

Why the first weeks of keto can shift the balance

When carbs go down, the body uses up its stored carbohydrate, called glycogen. Glycogen is stored with water, so that water is released. At the same time, lower insulin levels seem to make the kidneys let go of more sodium, and water follows the sodium.

None of this is a sign that something is broken. It is the body adjusting. But in that adjustment window, a few days to a few weeks for many people, sodium and fluid can run a little low. That is thought to be one reason behind the tired, headachy days people call the keto flu. The evidence is limited and comes mostly from small studies and people's own reports, so take it as a likely explanation, not a rule.

If you are in that phase right now, our gentle guide to the first two weeks has more on rest and pacing.

An avocado cut in half on a light countertop
Avocado: a calm, everyday source of potassium Photo: Rens D on Unsplash

Food first: where to find each mineral

Before thinking about any supplement, it helps to look at your plate. Many keto-friendly foods are naturally rich in these minerals. The numbers below are rough averages per serving and will vary with the product and how it is prepared.

Food (serving) Approx. net carbs Mostly brings
Avocado, half (about 100 g) 2 g Potassium, some magnesium
Cooked spinach, 1 cup (about 180 g) 2-3 g Magnesium, potassium
Pumpkin seeds, 30 g 1-2 g Magnesium
Almonds, 30 g 2-3 g Magnesium, some potassium
Salmon, 120 g 0 g Potassium
Mushrooms, 1 cup cooked (about 150 g) 4-5 g Potassium
Tahini, 1 tablespoon 1-2 g Magnesium, calcium
Clear broth, 1 cup 0-1 g Sodium
Olives, 10 1 g Sodium
Plain yogurt or labneh, 150 g 5-7 g Calcium, potassium
Three cards: salt with broth and olives, avocado with greens and salmon, almonds with seeds
Three simple groups: salty foods, greens and avocado, nuts and seeds Illustration: KetoBeast

A simple way to think about your plate

  • Salty friends for sodium: salt your food to taste, olives, pickles, a cup of broth, hard cheeses.
  • Green and creamy for potassium: avocado, spinach, zucchini, mushrooms, salmon.
  • Crunchy for magnesium: pumpkin seeds, almonds, sesame and tahini, a square of very dark chocolate if it fits your carbs.

If each day touches all three groups, you are likely in a good place for a calm start.

A gentle daily routine for the first weeks

Here is a simple checklist many people find helpful while their body adjusts. Adapt it to your own appetite and schedule.

  1. Salt your meals to taste. On keto you are cooking more from scratch, so you may eat less salt than before without noticing. Do not be shy with the salt shaker, unless your doctor has told you to limit it.
  2. Add one potassium food to each meal. Half an avocado at breakfast, a big handful of greens at lunch, mushrooms or salmon at dinner.
  3. Have one handful of seeds or nuts a day. About 30 g of pumpkin seeds or almonds brings a good share of magnesium.
  4. Drink to thirst, and spread it out. Water and minerals work as a team. Drinking a lot of plain water while sodium is low may not help, and our guide to hydration on keto explains why.
  5. Notice your signals for a week. Headaches, cramps, low energy or dizziness when you stand up are worth writing down, along with what you ate.
  6. Slow down if you need to. Gentle walks instead of hard workouts are fine while you settle in.

When to be careful with supplements

Electrolyte powders and magnesium tablets are everywhere, and some people do use them. Still, food is the safer starting point, and supplements are where a little caution matters most.

Potassium

The body keeps potassium within a narrow range. Too little and too much can both affect heart rhythm. Potassium supplements and salt substitutes based on potassium can push levels too high in people with kidney disease or those taking certain blood pressure or heart medications. Talk to your doctor before taking them.

Magnesium

Magnesium from food is generally well tolerated. In supplement form, large doses can upset the stomach and cause diarrhoea, and people with kidney problems may not clear it well. If you want to try one, ask a doctor or pharmacist what kind and how much fits you.

Sodium

Salt is the easiest one to adjust from food. Most health guidance, including the World Health Organization, encourages people to eat less salt, because high intake is linked to high blood pressure. Keto in the first weeks is a slightly different situation, but it is not a reason to go far beyond your usual needs. If you have high blood pressure, heart failure or kidney disease, your doctor's advice on salt comes first.

Signals and what they may mean

Your body sends signals long before anything becomes serious. These are everyday clues, not a diagnosis.

What you notice What it may point to A gentle next step
Headache, low energy, foggy head in week one Fluid and sodium running low Salt your food, have a cup of broth, rest
Dizziness when standing up quickly Possibly low fluid or sodium Stand up slowly, drink, add salt to your next meal
Muscle cramps, often at night Possibly low magnesium, potassium or fluid Add greens, seeds and avocado; stretch gently
Loose stools after a new supplement Possibly too much magnesium Stop it and talk to your doctor or pharmacist
Symptoms that last more than two weeks Something else may be going on See a doctor and mention the change in diet

FAQ

Do I need an electrolyte supplement on keto?

Many healthy adults do well with food alone: salted meals, greens, avocado, nuts and seeds. Supplements can help some people, but check with a doctor first, especially if you have a medical condition or take medication.

How much salt should I eat on keto?

There is no single number that fits everyone. Many people simply salt food to taste and add broth or olives in the first weeks; if you have high blood pressure or kidney or heart issues, follow your doctor's guidance.

Can electrolytes help with keto flu?

For some people, paying attention to salt, fluids and mineral-rich foods seems to ease the tired, headachy days. The evidence is limited and results vary, so rest and patience matter too.

Are muscle cramps always about electrolytes?

Not always. Cramps can come from exercise, dehydration, certain medications or other causes, so if they are frequent or severe, a doctor can help find the reason.

Sources

my.clevelandclinic.orgmy.clevelandclinic.org www.who.intwww.who.int

If you have a medical condition, are pregnant or take medication, ask your doctor before changing your salt intake or starting any supplement.

This article is general information, not medical advice. Talk to your doctor before changing how you eat or fast, especially if you have a medical condition, are pregnant or take medication.

More in guides