Magnesium beta-hydroxybutyrate (magnesium BHB) is a ketone salt, a compound that pairs the mineral magnesium with beta-hydroxybutyrate, one of the three ketone bodies your liver naturally produces during fasting or carbohydrate restriction. It’s sold as a supplement to raise blood ketone levels while simultaneously delivering magnesium, making it popular among people following ketogenic diets.
How the Compound Is Structured
The molecule’s formal name is magnesium bis(3-hydroxybutanoate), and its chemical formula is C₈H₁₄MgO₆. In plain terms, a single magnesium ion (which carries a positive charge) is bonded to two molecules of beta-hydroxybutyric acid (each carrying a negative charge). When you swallow it, your digestive system splits these components apart: the magnesium is absorbed as a mineral, and the two BHB molecules enter your bloodstream as usable ketone fuel.
This dual-delivery design is the whole point of ketone salts. You’re not just getting ketones or just getting a mineral. You’re getting both in one package, which matters because ketogenic diets tend to increase your body’s excretion of key electrolytes, magnesium included.
What BHB Does in Your Body
Beta-hydroxybutyrate is your body’s preferred alternative fuel when glucose is scarce. During fasting or strict carb restriction, your liver converts fatty acids into ketone bodies, and BHB is the most abundant of the three. Once in circulation, BHB travels to tissues that need energy, particularly your brain and muscles.
Your brain is especially responsive to ketones. BHB crosses into the brain via specialized transporters and can supply up to 60% of the brain’s energy needs when glucose availability drops. Gram for gram, ketones deliver about 27% more usable energy than glucose while generating less oxidative stress, which is why researchers describe them as a cleaner-burning fuel. As BHB metabolism ramps up inside cells, it naturally dials down glucose use through a built-in feedback loop, so the two fuel sources don’t compete wastefully.
Beyond raw energy, BHB influences brain function in several other ways. It reduces the firing rate of neurons, helps regulate calcium balance inside nerve cells, and limits the release of glutamate, the brain’s main excitatory chemical messenger. It does this by directly blocking the transporter that loads glutamate into the tiny packages neurons use to send signals. The net effect is a calming of excessive neural activity, which is one reason ketogenic diets have been used therapeutically for epilepsy for over a century. BHB also promotes the production of BDNF, a protein that supports the growth and maintenance of brain cells.
In a clinical trial of older adults with mild cognitive impairment, six months of a ketone-boosting drink improved memory, attention, and the ability to switch between tasks. While that study used a different delivery method, the active ketone in the bloodstream was the same BHB molecule found in magnesium BHB supplements.
Why Magnesium Matters on a Keto Diet
When you sharply cut carbohydrates, your kidneys excrete more water and electrolytes than usual. This is the primary driver of “keto flu,” the headaches, muscle cramps, fatigue, and brain fog many people experience in the first week or two of a ketogenic diet. Magnesium is one of the electrolytes most commonly depleted during this transition, alongside sodium and potassium.
Magnesium BHB addresses both sides of the problem at once: it raises ketone levels to help your body adapt to fat-burning, and it replaces some of the magnesium you’re losing. That said, the amount of magnesium per serving is relatively modest. A typical exogenous ketone salt blend might deliver around 57 mg of magnesium per serving, well below the 300 to 400 mg most adults need daily. So magnesium BHB contributes to your intake but likely won’t cover the full gap on its own.
Magnesium BHB vs. Other Ketone Salts
Magnesium BHB is rarely sold in isolation. Most exogenous ketone products combine it with sodium BHB and calcium BHB in a single blend. A typical serving provides around 12 grams of total BHB salts, with sodium making up the largest mineral share (often around 40%), calcium next (about 30%), and magnesium last (roughly 30%). The ratios vary by brand.
The BHB molecule itself works the same regardless of which mineral carries it. The practical difference is the mineral you’re absorbing alongside it. Sodium BHB delivers the most milligrams of its mineral per serving, which is useful because sodium losses on keto are substantial, but it can push daily sodium intake high. In one controlled study, participants taking a ketone salt supplement consumed over 6,000 mg of sodium per day compared to about 2,350 mg in the control group. Calcium BHB adds to your calcium intake, and magnesium BHB adds to your magnesium intake. Choosing a blend that includes all three helps distribute the mineral load more evenly rather than overloading any single one.
One important finding from that same study: exogenous ketone salts boosted fasting blood ketone levels above the diet-only group for the first two weeks, but by week three, ketone levels equalized between the groups. The researchers concluded that the body adapts its ketone metabolism, increasing breakdown and kidney clearance, so the extra ketones from supplements stop accumulating. This suggests exogenous BHB salts are most useful during the early adaptation phase rather than as a long-term ketone booster.
Effects on Body Composition
Some people take magnesium BHB hoping it will accelerate fat loss or preserve muscle during dieting. The research so far is lukewarm on both counts. In a six-week controlled trial comparing a ketogenic diet plus ketone salts against a ketogenic diet plus placebo, there was no significant difference in weight loss or body composition between the two groups. There was a trend toward less nitrogen loss (a marker of muscle breakdown) in the ketone salt group, about 8% less, but it didn’t reach statistical significance. Over a longer period, that small difference could theoretically help preserve lean mass, but current evidence can’t confirm it.
Side Effects and Tolerability
The most common side effect of magnesium BHB is digestive discomfort. Magnesium in general can act as an osmotic laxative, pulling water into the intestines. Supplemental magnesium above 350 mg per day is the threshold where diarrhea becomes likely, and some people react to lower doses. Nausea, stomach cramps, and bloating are also possible, especially when you first start taking it or take it on an empty stomach.
The form of magnesium influences how well it’s absorbed and how much GI trouble it causes. Poorly absorbed forms like magnesium oxide are notorious for causing loose stools. Magnesium BHB falls somewhere in the middle of the absorption spectrum. If you experience persistent diarrhea, it’s worth noting that this can lead to dehydration and further electrolyte loss, which defeats the purpose of taking the supplement in the first place.
BHB salts also have a notoriously strong, salty, somewhat metallic taste that many people find unpleasant. Manufacturers mask it with flavoring, but it’s a common complaint across brands. Starting with a half serving to assess tolerance is a practical approach, both for taste and for digestive comfort.
Who Typically Uses It
Magnesium BHB supplements appeal to a few distinct groups. People new to ketogenic diets use them to ease the transition period, when the body hasn’t yet become efficient at producing its own ketones. Athletes on low-carb diets sometimes use them before training, hoping the extra ketones will provide quick energy without carbohydrates. And some people who practice intermittent fasting take them to deepen ketosis during their fasting window.
The supplement is not a shortcut to ketosis for someone eating a standard diet. If you’re consuming moderate to high carbohydrates, your body will burn through the supplemental ketones quickly and return to its glucose-dominant state. BHB salts work with a low-carb or fasting context, not as a replacement for one.

