Skip to content
ResearchKetoGut HealthInflammationKetonesChronic Disease

Keto Diets Reshape the Gut Microbiome and Reduce Inflammation via Th17 Cells

Keto affects the gut flora differently from regular high-fat diets. Ketone bodies suppress bifidobacteria, which leads to fewer pro-inflammatory Th17 cells — and so less inflammation.

Published: March 20, 20266 min

Keto Diets and the Gut: A Different Effect Than High-Fat Diets

The gut microbiome, the trillions of bacteria living in the intestines, responds rapidly to dietary changes. What we eat directly shapes which bacteria thrive, and this affects everything from immunity to metabolism. High-fat diets are generally known to shift the microbiome in an unfavorable direction, with more Firmicutes bacteria and fewer Bacteroidetes. But what happens when fat is so high and carbohydrates so low that the body enters ketosis?

In 2020, Ang and colleagues published a controlled inpatient study with 17 overweight men in the journal Cell, examining exactly this question. Participants lived in a research facility for 8 weeks, eating a standard diet for 4 weeks (50 percent carbohydrates, 35 percent fat) followed by a ketogenic diet for 4 weeks (5 percent carbohydrates, 80 percent fat). Caloric intake was matched across both periods, so any changes in the microbiome were due to dietary composition, not the amount of food.

Results showed marked differences. The ketogenic diet altered microbial composition in a way fundamentally different from a standard high-fat diet. Where high-fat diets typically increase Firmicutes, the ketogenic diet did the opposite. The most striking change was a significant decrease in Bifidobacterium, a bacterial genus generally considered beneficial for gut health.

In short: A controlled inpatient study with 17 men shows keto reshapes the microbiome differently than ordinary high-fat diets, Bifidobacterium drops, but the inflammatory Th17 cells fall too, lowering low-grade inflammation. The keto-microbiome story is more nuanced than "all carbohydrate restriction is bad for the gut".

Ketone Bodies Directly Steer the Microbiome

To understand what was driving these changes, researchers conducted a series of experiments in mice. Three groups of mice were fed a low-fat diet, a high-fat diet, or a ketogenic diet for 3 weeks. Only the mice in ketosis (with elevated blood BHB) showed the characteristic decrease in bifidobacteria.

The key experiment was a gradient study with four diets in which carbohydrate content was lowered stepwise from 15 to 0 percent (fat content 75 to 90 percent). The researchers found that the gut microbiome changed markedly once carbohydrates fell to 1 percent or below, but not further between 1 and 0 percent carbohydrate. The tipping point therefore sat at near-total carbohydrate exclusion, not at a particular fat percentage. This suggested that it was the ketones themselves, not just the amount of fat, that were affecting the bacteria.

To confirm this, researchers gave mice a synthetic ketone ester that raised BHB levels without changing dietary fat content. The result was the same: bifidobacteria decreased. In laboratory cultures, BHB directly inhibited the growth of Bifidobacterium adolescentis, even at concentrations matching those found in the gut during ketosis.

How keto's anti-inflammatory effect arises

Keto → BHB rises
Ketone bodies in the blood
→
Bifidobacteria drop
BHB suppresses them directly
→
Fewer Th17 cells
In gut and fat tissue
→
Less inflammation
Lower low-grade inflammation
It's BHB itself, not just the absence of carbs, that drives the chain. Plain high-fat diets without ketosis don't have the same effect on Th17 cells.

Fewer Th17 Cells: The Microbiome's Signal to the Immune System

The most surprising part of the research concerned what the microbiome shift meant for the immune system. Th17 cells are a type of immune cell that produces the pro-inflammatory signaling molecule IL-17. They play an important role in defending against infections, but when too numerous or overactive, they contribute to chronic inflammation, autoimmune diseases, and the inflammatory processes associated with obesity.

Researchers found that mice on a ketogenic diet had significantly fewer Th17 cells in the intestinal lining compared to mice on a high-fat diet. To prove that it was the microbiome change driving this effect (rather than the diet directly), they transplanted gut bacteria from humans on either a standard or ketogenic diet into germ-free mice. Mice receiving 'keto-microbiota' had fewer Th17 cells than those receiving 'standard-microbiota.' This confirms that it is the bacterial composition, shaped by ketone bodies, that sends the signal to the immune system.

Even more compelling were single-bacterium colonization experiments. Mice colonized only with Bifidobacterium adolescentis developed more Th17 cells. When bifidobacteria disappeared (as during ketosis), Th17 cells decreased accordingly.

What Does This Mean in Practice?

This research reveals a previously unknown communication pathway: when the body produces ketone bodies during fasting or ketogenic dieting, these compounds directly influence which bacteria thrive in the gut. The altered microbiome then sends signals to the immune system, resulting in fewer pro-inflammatory Th17 cells in both the gut and adipose tissue.

This mechanism may partially explain why ketogenic diets show promising results in conditions involving chronic inflammation, autoimmune diseases, and even severe epilepsy. Other researchers have found that patients with treatment-resistant epilepsy have elevated Th17 cells, which are partially normalized by a ketogenic diet. Ang and colleagues point to this as a possible explanation for the ketogenic diet's effect in epilepsy, but did not study epilepsy patients themselves. This suggests that the gut microbiome's role in the ketogenic diet's effectiveness is far more central than previously assumed.

For individuals, this means that the health effects of ketogenic diets extend beyond weight loss and blood sugar control. By reshaping microbial composition, ketosis can influence the immune system in ways that potentially protect against chronic inflammation. It underscores the importance of considering gut health as an integral part of any dietary change, and that the benefits of keto are not just about what we eat, but about how our bodies and bacteria communicate.

Who Is This For?

Research on keto and Th17 cells points to an interesting immunological avenue, but it is largely preclinical (mouse studies and cell experiments). The following groups should take note:

  • People with autoimmune diseases (psoriasis, multiple sclerosis, rheumatoid arthritis): Th17 cells are central in several autoimmune conditions, but therapeutic use of keto must always be followed by a rheumatologist or neurologist, not self-treatment.
  • People with inflammatory bowel disease (Crohn's, ulcerative colitis): A ketogenic diet can affect both symptoms and gut microbiota, but response is highly individual. Always start in consultation with a gastroenterologist.
  • People with type 1 diabetes: Risk of diabetic ketoacidosis (DKA), keto can only be used under specialist supervision.
  • People on immunosuppressive medication: Major dietary changes can affect drug efficacy, dosing must be evaluated by a doctor.
  • Pregnant and breastfeeding women: Prolonged ketosis is not recommended, energy and nutrient needs are elevated.
  • People with a history of eating disorders: Strict dietary rules can reactivate restrictive patterns.
  • Children and adolescents: A ketogenic diet should only be used under the supervision of a doctor or dietitian in children and adolescents, unless there is a well-established medical reason, such as epilepsy managed by a specialist.

For healthy adults, a ketogenic diet for a defined period (e.g., 8-12 weeks) is generally safe, but prolonged ketosis without individual follow-up is discouraged, particularly due to possible changes in gut microbiota diversity.

Related Reading

Keto affects gut microbiota, inflammation and immune function, three overlapping systems. These articles explore the interplay:

TH17BifidobacteriumBHBMicrobiome
Keto Assistant

Hi! I'm your keto assistant

Ask me about keto diet, fasting, recipes or health. You can also upload a food image and I'll assess whether it's keto-friendly.