Blue poop is almost always caused by something you ate or drank. Blue food dyes, certain medications, and brightly colored foods pass through your digestive system and tint your stool in ways that look alarming but are typically harmless. In rare cases, an underlying condition can be responsible, so the color of what you recently consumed is the first clue worth investigating.
Blue Foods and Artificial Dyes
The most common reason for blue stool is FD&C Blue No. 1, also known as Brilliant Blue FCF. The FDA approved this dye for general food use in 1993, and it shows up in a surprisingly long list of everyday products: breakfast cereals, juice drinks, soft drinks, frozen dairy desserts, popsicles, frostings, and icings. These categories represent the greatest source of Blue No. 1 exposure in the United States. If you recently had a blue slushie, a bowl of brightly colored cereal, frosted cupcakes, or blue sports drinks, that’s almost certainly your answer.
Your body doesn’t fully break down these synthetic dyes during digestion. They pass through largely intact, coloring your stool along the way. Depending on how much you consumed and what else you ate, the result can range from blue-green to a deep, vivid blue. Blueberries, blue corn chips, and foods made with blue spirulina can produce the same effect through natural pigments rather than synthetic ones. The color typically resolves within one to two bowel movements once the dyed food has cleared your system.
Medications That Change Stool Color
Several medications can turn your stool blue or blue-green. Methylene blue, used in certain diagnostic procedures and to treat specific medical conditions, is one of the most well-known. It produces a characteristic blue discoloration of urine and can affect stool color as well. The compound undergoes oxidation in the body, shifting between colorless and vivid blue-green forms depending on oxygen exposure.
Bismuth subsalicylate, the active ingredient in Pepto-Bismol, more commonly turns stool black, but in some cases can produce a very dark blue-black shade that looks blue under certain lighting. This side effect usually resolves within several days after you stop taking the medication. Iron supplements can create a similar dark appearance that some people interpret as blue rather than black. If you started any new medication or supplement recently and noticed the color change shortly after, the timing alone is a strong indicator.
How Bile Affects Stool Color
Normal brown stool gets its color from bile, a digestive fluid your liver produces. Bile starts out yellow-green and gradually transforms to brown as bacteria in your intestines break it down during digestion. When food moves through your gut faster than usual (from diarrhea, a stomach bug, or anything that speeds up transit), bile doesn’t have time to fully convert. The result is green stool, which can sometimes appear blue-green, especially if blue-dyed food is also in the mix.
So if your blue stool arrived alongside loose or watery bowel movements, rapid transit time is likely contributing to the color. The combination of unprocessed bile and even a small amount of blue dye can produce a strikingly blue result that neither factor would cause on its own.
Bacterial Infections
In uncommon cases, a type of bacteria called Pseudomonas aeruginosa can produce blue-green stools. This bacterium manufactures a pigment called pyocyanin, which has a distinctive blue-green color. Pseudomonas infections are rare in healthy people and more often occur in hospitalized patients or those with weakened immune systems. If a bacterial cause were responsible, you’d typically have other symptoms like fever, abdominal pain, or significant diarrhea alongside the color change.
Blue Diaper Syndrome
There is an extremely rare genetic condition called blue diaper syndrome (Drummond’s syndrome) that causes blue-tinged urine in infants. Affected babies can’t properly absorb tryptophan, an amino acid, in their intestines. Gut bacteria then metabolize the excess tryptophan into a compound called indican, which turns blue when it oxidizes in urine. This condition is so rare that estimating its incidence is difficult, and it’s diagnosed in infancy rather than adulthood. If you’re an adult searching this topic, blue diaper syndrome is almost certainly not relevant to you.
When Blue Stool Needs Attention
If you can trace your blue stool back to a food, drink, or medication, there’s generally nothing to worry about. The color should return to brown within a few days once the cause passes through your system. The situations worth paying closer attention to are when blue or unusual stool color persists beyond a few days, when you can’t identify an obvious dietary or medication cause, or when other symptoms accompany it. Fever, diarrhea, abdominal pain, or unexplained weight loss alongside a persistent color change are all reasons to get it checked out. Stool that changes colors frequently without a clear dietary explanation is also worth mentioning to a provider.
For most people who find themselves staring into the toilet in surprise, the answer is simpler than it seems: think back to what you ate or drank 12 to 24 hours ago. A single blue-frosted cookie or a large blue raspberry drink contains more than enough dye to turn an entire bowel movement a shade you’ve never seen before.

