Green poop is almost always harmless. The most common cause is something you ate, whether that’s a big spinach salad, a smoothie packed with kale, or a cupcake with bright frosting. In other cases, green stool happens because food moved through your intestines faster than usual, which prevents your digestive system from completing its normal color-change process. Understanding why this happens can help you figure out whether your green poop is a one-off quirk or something worth paying attention to.
How Poop Gets Its Normal Brown Color
Your liver produces bile, a yellow-green fluid that helps digest fats. When bile enters your intestines, it starts out greenish. As it travels through the roughly 25 feet of your digestive tract, bacteria break it down through several chemical steps, eventually converting it into a pigment called stercobilin. Stercobilin is orange-brown, and it’s the reason healthy stool is typically some shade of brown.
This process takes time. The average transit through the colon alone is 30 to 40 hours, and anything up to about 72 hours is considered normal. When food moves through faster than that, the bacteria in your gut don’t get enough time to fully convert bile’s green pigments into brown ones. The result: stool that still carries some of that original yellow-green color.
Foods That Turn Stool Green
The simplest explanation is often the right one. Chlorophyll, the pigment that makes plants green, can do the same to your stool when you eat enough of it. The usual suspects include spinach, kale, broccoli, avocados, fresh herbs, and matcha. Pistachios can also contribute, thanks to a combination of chlorophyll and other plant pigments.
Artificial food dyes are another frequent cause. Bright blue or green frosting, candy, sports drinks, or ice cream can produce surprisingly vivid stool colors. Blue dye in particular mixes with the yellow of bile and creates a striking green. If you recently ate something with heavy food coloring, that’s likely your answer.
In both cases, the color change is temporary and completely harmless. It typically resolves within a day or two once the food clears your system.
Supplements and Medications
Iron supplements are a well-known culprit. If you’ve recently started taking iron, expect your stool to turn dark green or even blackish-green. This is a normal reaction to unabsorbed iron and not a sign of a problem.
Certain antibiotics can also tint stool green or yellow-green. They do this by disrupting the balance of gut bacteria responsible for converting bile pigments to their final brown color. With fewer of the right bacteria doing their job, bile passes through with more of its original green hue intact. Some other medications, including certain hormonal birth control shots and some anti-inflammatory drugs, have also been reported to cause green stool as a side effect.
Fast Transit and Diarrhea
When something speeds up your digestion, bile doesn’t have time to complete its color transformation. This is why diarrhea from any cause often comes out green. The faster things move, the greener the result. Think of brown stool as fully “processed” and green stool as bile that got rushed through the system.
Several things can trigger this rapid transit. A stomach bug (viral gastroenteritis from norovirus, for example) is one of the most common. Food poisoning from bacteria like Salmonella or E. coli can do the same, as can parasitic infections like Giardia. In all of these cases, the green color itself isn’t the concern. It’s just a visible sign that your intestines are moving contents through quickly. Conditions like irritable bowel syndrome can also speed things up during flare-ups, producing occasional green stools.
If you’re experiencing diarrhea along with the green color, staying hydrated matters more than worrying about the color. The green will resolve once your digestion returns to its normal pace.
Green Stool in Babies
Parents often notice green poop in their infants, and it’s rarely a problem. Newborns pass meconium in their first few days, which is dark green to black and completely normal. As feeding gets established, stool color shifts, but green can still show up for several reasons.
In breastfed babies, green stool sometimes happens when the baby doesn’t fully finish nursing on one side before switching. The earlier milk (foremilk) is thinner and lower in fat, while the later milk (hindmilk) is richer. When a baby gets more foremilk than hindmilk, it can affect how the milk is digested and produce greener stool. Breastfed infants may also have green stool simply because they haven’t yet developed a full population of the gut bacteria that convert bile pigments.
Formula-fed babies on protein hydrolysate formulas, which are designed for infants with milk or soy allergies, commonly produce green stool as well. And just like adults, babies with diarrhea from any cause may have green poop because of faster transit.
When Green Poop Signals Something More
A single episode of green stool, or even a few days of it after a dietary change, is not concerning. But certain patterns deserve attention. Green stool that persists for more than a few days without an obvious dietary explanation is worth mentioning to a doctor. The same goes for green diarrhea accompanied by fever, severe cramping, or signs of dehydration like dark urine, dizziness, or (in children) fewer wet diapers than usual.
These combinations can point to a bacterial or parasitic infection that may need treatment. The green color itself isn’t dangerous, but it can be a useful clue when paired with other symptoms that something infectious or inflammatory is going on in your gut.

