Can Antibiotics Make Your Poop Yellow?

Antibiotics can absolutely make your poop yellow, and it happens through a surprisingly direct mechanism: the drugs kill off the gut bacteria responsible for turning your stool brown in the first place. Without those microbes doing their job, the pigment that gives feces its familiar color never forms properly, and what comes out can range from bright yellow to pale and clay-like. The effect is temporary for most people, but understanding why it happens helps you figure out when it is just a harmless side effect and when it deserves a phone call to your doctor.

Why Stool Is Normally Brown

The brown color of a healthy bowel movement comes from a pigment called stercobilin. It starts as bilirubin, a yellowish waste product your liver produces when it breaks down old red blood cells. Your liver processes bilirubin, attaches it to other molecules so it dissolves in water, and dumps it into your intestine via bile. At that point the bilirubin is still yellow-green. The critical color change happens downstream, in your colon, where trillions of bacteria chemically convert that bilirubin into a family of compounds called urobilinoids. Stercobilin, the end product of that bacterial work, is what makes stool brown.1Trends in Endocrinology & Metabolism. The Liver–Gut Axis in Health and Disease: The Role of Bilirubin-Microbiota Interactions

This means stool color is not just about what you eat or how much bile your liver produces. It depends on whether the right bacteria are alive and active in your gut to finish the pigment conversion. Anything that wipes out those bacteria can short-circuit the process and leave you with stool that looks yellow, greenish, or even pale.

How Antibiotics Interrupt the Pigment Pathway

Antibiotics are designed to kill bacteria, but they are not very precise about which bacteria they kill. Along with the infection-causing microbes, broad-spectrum antibiotics also hammer the resident gut flora that normally converts bilirubin into brown stercobilin. When those populations drop, two things happen at once. First, less urobilinogen (the intermediate pigment) gets produced, so stools lose their brown color. Second, unconverted bilirubin, which is yellow, can start showing up directly in the stool.

A study in healthy volunteers given oral courses of bacitracin, vancomycin, clindamycin, erythromycin, and ampicillin found that all five antibiotics significantly suppressed fecal urobilinogen excretion. Clindamycin stood out by also causing a marked increase of conjugated bilirubin in the feces, meaning the raw yellow pigment was passing through essentially untouched by gut bacteria.2PubMed. Influence of antibiotics on the faecal excretion of bile pigments in healthy subjects Research with a combination of clindamycin and neomycin went even further, showing that the fecal urobilinoids disappeared entirely during treatment, which would leave stool with virtually no brown pigment at all.3PubMed. The impact of intestinal microflora on serum bilirubin levels

So the yellow color is not some mysterious drug side effect. It is the natural color of bilirubin that your body was already producing, just now visible because the bacteria that normally convert it have been knocked out.

Which Antibiotics Are Most Likely to Cause It

Not every antibiotic course will change your stool color, but the broader the spectrum of bacteria an antibiotic targets, the more likely it is to disrupt the pigment-converting flora. Research has specifically documented the effect with the following classes:

Narrow-spectrum antibiotics that target a smaller set of bacteria are less likely to cause visible color changes, though individual responses vary depending on which specific microbial populations you had before treatment started.

Diarrhea Makes It Worse

Yellow stool during an antibiotic course often comes packaged with diarrhea, and the two reinforce each other. Antibiotic-associated diarrhea is extremely common, affecting somewhere around one in five people who take oral antibiotics. When stool moves through the colon faster than usual, there is simply less time for whatever surviving bacteria remain to convert bilirubin. Speed plus depleted bacteria equals stool that is both loose and yellow.

Antibiotics can also affect bile acid processing in the gut. Normally, gut bacteria modify bile acids in the colon, and those modified bile acids get reabsorbed efficiently. When the bacterial populations responsible for this modification are disrupted, more primary bile acids reach the colon, which can stimulate water secretion and speed up transit even further.6PubMed Central. Bile acid diarrhoea: pathophysiology, diagnosis and management The result is a vicious cycle: antibiotics reduce the bacteria that handle bile acids, excess bile acids cause watery diarrhea, and the rapid transit prevents the remaining bacteria from having enough contact time with bilirubin to turn it brown.

If you are having frequent loose yellow stools while on antibiotics, it does not necessarily mean something is wrong beyond the expected disruption. But if the diarrhea becomes severe, bloody, or persists after you finish the course, that is a different situation.

When Yellow Stool Signals a More Serious Problem

Most antibiotic-related yellow stool is harmless and self-correcting once the course ends. But antibiotics can also set the stage for Clostridioides difficile infection, a potentially dangerous overgrowth of a toxin-producing bacterium that thrives when normal gut flora are suppressed. C. diff diarrhea can produce yellow or greenish watery stool, sometimes with mucus or blood, and tends to be far more frequent and debilitating than ordinary antibiotic-associated diarrhea.

The key differences that should prompt medical attention: diarrhea that gets worse rather than better as you continue or finish antibiotics, stool frequency climbing to many episodes per day, cramping or abdominal pain that escalates, fever, or any blood in the stool. In severe C. diff cases, stool frequency can climb dramatically. One case report documented a patient having over 20 watery episodes per day before treatment brought that number down and stool consistency improved.7PubMed Central. Fecal Microbiota Transplantation for Refractory Clostridioides difficile Infection Post Haploidentical Transplant for Pediatric Acute Myeloid Leukemia

Yellow stool can also be caused by things that have nothing to do with antibiotics. Gallbladder problems, liver disease, pancreatic insufficiency, and celiac disease can all produce pale or yellow stool because they interfere with bile production or fat digestion. If your stool was yellow before you started antibiotics, or if it stays yellow long after you finish, the cause may not be the medication at all. Persistent pale, clay-colored, or greasy yellow stool warrants investigation regardless of whether you have recently taken antibiotics.

Babies and Antibiotics Follow a Different Pattern

In newborns, the stool color timeline is already complicated. Babies start with dark meconium, transition through greenish stools, and eventually reach the familiar yellow of breastfed or formula-fed infants. Interestingly, in premature babies, antibiotic treatment delays this entire color transition rather than causing a shift from brown to yellow.

A study of preterm infants found that those who received eight or more days of antibiotic treatment took significantly longer to reach yellow stools compared to infants who received shorter courses or no antibiotics at all. Babies in the no-antibiotic group started passing yellow stools around day 8 of life, while those with extended antibiotic exposure did not reach yellow stools until around day 13.8MDPI. Neonatal Antibiotic Treatment Can Affect Stool Pattern and Oral Tolerance in Preterm Infants The researchers found a strong association between neonatal antibiotic treatment and the timing of this transition.

This makes sense through the same mechanism: newborns are still colonizing their guts with bacteria, and antibiotics slow that process down. In adults, antibiotics remove existing bacteria and turn stool more yellow. In newborns who have not yet built up those populations, antibiotics delay the establishment of the very flora that would produce normal stool color in the first place. The underlying biology is the same, but the visible result looks different because the starting point is different.

How Long the Color Change Lasts

For most adults, stool color begins returning to normal within days to a couple of weeks after finishing an antibiotic course. The speed of recovery depends on how thoroughly the antibiotics depleted your gut flora and how quickly those populations bounce back. Research on post-antibiotic microbiome recovery shows that the timeline is not fixed. It depends on what you eat, which bacterial species survived, and even what microbes you pick up from your environment during recovery.9PubMed Central. Recovery of the gut microbiota after antibiotics depends on host diet, community context, and environmental reservoirs

Eating a diet rich in fiber tends to support faster regrowth of the bacterial communities involved in bilirubin conversion, since many of those microbes feed on complex carbohydrates. Some people reach for probiotic supplements or fermented foods during and after antibiotic treatment, and while there is reasonable logic behind the idea, evidence for whether specific probiotic strains meaningfully speed up the return of normal stool color is still thin. The gut ecosystem is extraordinarily complex, and dropping in a few billion bacteria from a capsule does not necessarily restore the specific populations that handle pigment conversion.

If your stool color has not normalized within two to three weeks of finishing antibiotics, it is worth mentioning to your doctor, not because it is necessarily dangerous, but because it could indicate that recovery is stalling or that something else is contributing.

Other Reasons Your Stool Might Turn Yellow at the Same Time

People often start antibiotics when they are already sick, and the illness itself can change stool color independently. A stomach virus or food poisoning speeds up transit time and can produce yellow, watery stool before you ever take the first pill. If you are taking antibiotics for a gut infection, sorting out what the infection is doing versus what the antibiotic is doing can be genuinely difficult.

Diet also plays a role that gets overlooked. If you are eating less while sick, or switching to bland foods like crackers and broth, the reduced fat and fiber intake can lighten stool color on its own. Certain foods like turmeric, sweet potatoes, and carrots can also add a yellowish tinge. And if you are taking over-the-counter antacids or bismuth compounds alongside your antibiotics, those can interact with stool color in their own ways.

The practical takeaway: if you notice yellow stool during an antibiotic course, the most likely explanation is the antibiotic itself disrupting your gut bacteria. But if the color persists, if you have other new symptoms, or if the stool becomes truly pale or white, consider that something beyond the antibiotic might be going on. Pale or white stool in particular suggests bile is not reaching the intestine at all, which points toward a liver or gallbladder issue rather than a microbiome disruption.

What Antibiotics Do to Other Gut Functions Beyond Color

The same bacterial populations that convert bilirubin into brown stercobilin handle a surprising number of other tasks in the colon. Researchers who tracked multiple markers of bacterial activity during antibiotic treatment found that the disruption extended well beyond pigment conversion. Ampicillin significantly reduced the production of short-chain fatty acids, which are important fuel sources for the cells lining the colon. Metronidazole disrupted the conversion of cholesterol to coprostanol, a separate bacterial process that normally happens alongside bilirubin conversion.4PubMed. Influence of peroral antibiotics upon the biotransformatory activity of the intestinal microflora in healthy subjects

This broader disruption helps explain why antibiotic side effects are not limited to a change in stool color. Bloating, gas, altered bowel habits, and even changes in how certain nutrients are absorbed can all stem from the same underlying cause: the loss of microbial communities that normally perform dozens of chemical transformations in the gut. Yellow stool is the most visually obvious sign that these populations have taken a hit, but it is really just the tip of the iceberg in terms of what is happening inside the colon during and after antibiotic treatment. The color change is harmless on its own, but it serves as a useful visible marker that your gut ecosystem has been significantly altered and will need time to rebuild.