Green poop is almost always harmless. In most cases, it means you ate something with a lot of green pigment, or your food moved through your digestive system faster than usual. Occasionally, green stool signals an infection or a reaction to medication, but the color alone is rarely a reason to worry.
Why Stool Turns Green
Your stool gets its normal brown color from bile, a digestive fluid your liver produces. Bile starts out yellow-green, then gradually shifts to brown as bacteria in your intestines break it down during digestion. Anything that interrupts this process, whether it’s a food that adds its own pigment or a faster-than-normal trip through your gut, can leave your stool looking green.
Foods That Turn Your Poop Green
The most common cause is simply eating a lot of green or brightly colored food. Spinach, kale, broccoli, avocados, herbs, and matcha all contain chlorophyll, the pigment that makes plants green. Eat enough of it and that pigment passes through to your stool. Pistachios can do the same thing, since their green color also comes from chlorophyll and related plant compounds.
Artificial food dyes are another frequent culprit, and the shade they produce can be surprisingly vivid. A synthetic dye called Blue No. 1, commonly added to candies, beverages, frostings, and even some medications, is poorly absorbed in the digestive tract. If you consume enough of it, it can turn your stool a bright, almost fluorescent green. Because blue and yellow mix to make green, blue dye combining with the yellow-green of bile creates that striking color. Brightly frosted cupcakes, rainbow candy, and colored drinks are classic triggers.
Rapid Transit Through the Gut
The average time for food to travel through your colon is 30 to 40 hours, and anything up to about 72 hours is still considered normal. When something speeds that process up, bile doesn’t have enough time to fully break down and shift from green to brown. The result is greenish stool.
Lots of things can accelerate transit: a stomach bug, a spicy meal, stress, too much coffee, or a sudden increase in fiber. Diarrhea from any cause tends to produce green stool for exactly this reason. The food moves through so quickly that the bile pigments stay in their earlier green state. If you’ve had a bout of loose stools and noticed a green tint, that’s the most likely explanation.
Antibiotics and Other Medications
Antibiotics can cause green stool by disrupting the balance of bacteria in your gut. Your intestinal bacteria play a direct role in converting bile from green to brown, so when antibiotics reduce those bacterial populations, bile stays greener longer. This is a common and generally temporary side effect that resolves after you finish the course of medication.
Iron supplements are another well-known cause. Iron that isn’t fully absorbed in the upper digestive tract reacts with compounds in your gut and can produce dark green or even black stool. If you recently started an iron supplement and your stool changed color, that’s almost certainly the reason.
Infections That Cause Green Stool
Certain bacterial infections, particularly Salmonella and E. coli, can produce green diarrhea. These infections typically come with other symptoms like cramping, fever, nausea, or vomiting. Norovirus (commonly called the stomach flu) can also change stool color, partly because it causes diarrhea that speeds up transit time. In these cases, the green color is a byproduct of the illness, not the main concern. The diarrhea itself and the risk of dehydration matter more.
Parasitic infections like Giardia, often picked up from contaminated water, can similarly produce green, foul-smelling stool. If green stool comes alongside persistent diarrhea, bloating, and fatigue, especially after travel or camping, a parasitic cause is worth considering.
Green Poop in Babies
Green stool in infants is common and has its own set of causes. Breastfed babies sometimes produce green poop if they don’t finish feeding on one side before switching. This means they get more of the thinner, lower-fat milk at the start of a feeding and less of the fattier milk that comes later, which can affect how the milk is digested. The fix is usually simple: let the baby finish one breast before offering the other.
Babies on protein hydrolysate formula, a type used for milk or soy allergies, often have green stool as a normal side effect of the formula’s composition. Iron-fortified formulas can also contribute. In newborns, green stool can simply reflect the fact that the baby’s gut hasn’t yet been fully colonized by the bacteria that turn bile brown. As the microbiome develops over the first weeks and months, stool color typically shifts toward the expected yellow or brown range.
Diarrhea in babies can produce green stool for the same transit-time reasons it does in adults, but dehydration in infants is more serious and develops faster. Signs include fewer wet diapers, a dry mouth, and crying without tears.
When Green Stool Needs Attention
An occasional green bowel movement, especially after a salad-heavy meal or a course of antibiotics, needs no action at all. The Mayo Clinic notes that green stool lasting more than a few days without an obvious dietary explanation is worth mentioning to a healthcare provider. The color itself isn’t the concern. What matters is what accompanies it.
Green stool paired with persistent diarrhea, fever, blood or mucus in the stool, significant cramping, or signs of dehydration (dark urine, dizziness, dry mouth) suggests something beyond diet. In those situations, the underlying cause, whether an infection or an inflammatory condition, is what needs evaluation. Green stool that resolves on its own within a day or two, or that clearly tracks with something you ate, is almost always nothing more than your digestive system doing its job with unusual raw materials.

