What Can Turn Your Poop Green? Foods, Meds, and More

Green poop is almost always harmless. The most common causes are eating green vegetables, consuming foods with certain dyes, taking iron supplements, or having something move through your digestive system faster than usual. Understanding why it happens comes down to one key fact: your stool is naturally green before your gut bacteria finish processing it.

Why Stool Is Brown in the First Place

Your liver produces bile, a greenish-yellow fluid that helps digest fats. When bile enters your intestines, gut bacteria break it down through several chemical steps, eventually converting it into a dark orange pigment called stercobilin. That pigment is what gives stool its characteristic brown color.

Anything that interrupts this conversion process, whether by adding green pigment on top or by rushing food through before bacteria can finish the job, can leave your stool looking green. This is why the causes fall into two broad categories: things that add green color and things that speed up transit time.

Green and Leafy Foods

Chlorophyll, the pigment that makes plants green, passes through your digestive system with its color largely intact. Eating generous amounts of spinach, kale, broccoli, or other dark leafy greens is one of the most common reasons for bright green stool. Avocados, fresh herbs like parsley and cilantro, and matcha (powdered green tea) can do the same thing.

Pistachios are another overlooked culprit. Their green color comes from chlorophyll and other plant pigments, and eating a large handful can be enough to shift stool color. Blueberries, while not green themselves, can produce greenish or blue-green stool depending on how their pigments interact with bile during digestion.

In all of these cases, the color change is proportional to how much you eat. A small side salad probably won’t do it. A big green smoothie with spinach, kale, and matcha very well might.

Food Dyes and Artificial Coloring

Artificial food dyes are designed to be vivid and stable, and they stay that way as they travel through your gut. Brightly frosted cupcakes, colorful candies, blue sports drinks, and dyed ice cream can all tint your stool unexpected colors. Blue and purple dyes are especially likely to produce green stool because they mix with the yellow-green of bile to create a green result. If you eat enough rainbow-colored candy, the mixed dyes can even turn stool black.

The effect usually shows up within a day or two of eating the dyed food and disappears just as quickly once you stop.

Iron Supplements

Iron supplements are well known for changing stool color. Most people expect black stool from iron, but dark green is just as common. The NHS notes that darker-than-usual stool is a standard side effect of iron supplementation and not a cause for concern. The color change happens because your body only absorbs a portion of the iron you take, and the unabsorbed iron oxidizes as it moves through the intestines, producing dark green or blackish pigments.

This effect is consistent for as long as you take iron and resolves once you stop.

Antibiotics and Other Medications

Some antibiotics can turn stool yellow or green. The mechanism is indirect: antibiotics kill off some of the gut bacteria responsible for converting bile pigments into stercobilin. With fewer bacteria doing that work, bile passes through in a less-processed state, retaining more of its original green color. The effect typically resolves after you finish the course of antibiotics and your gut bacteria repopulate.

Certain other medications, including some laxatives and the anti-inflammatory indomethacin, have also been associated with green stool.

Rapid Transit and Diarrhea

When food moves through your intestines faster than normal, bile doesn’t have enough time to be fully broken down by gut bacteria. Since bile starts out green, the result is green stool. This is why diarrhea from any cause, whether it’s food poisoning, a stomach bug, or stress, often comes out green.

Infections are a common trigger. Bacterial infections like Salmonella and E. coli, viral infections like norovirus, and parasites like Giardia can all cause rapid-transit diarrhea with green stool. In these cases, the green color itself isn’t the problem. It’s a visible sign that things are moving through too fast for normal digestion. The infection is what matters, and the green color is just a byproduct.

Even without an infection, anything that speeds up your gut can have this effect: high caffeine intake, large doses of magnesium, intense anxiety, or conditions like irritable bowel syndrome during a flare.

Green Stool in Babies

Green poop in newborns is completely normal. A baby’s first stools, called meconium, are typically dark brown or green and very sticky. This appears in the diaper for the first couple of days after birth. As the baby starts feeding, stool transitions to a more yellowish-green color before eventually settling into shades of yellow, green, or brown depending on diet.

Breastfed babies in particular can have mustard-yellow to green stool as a normal variation. Formula-fed babies tend toward tan or brown but can also produce green stools. In older infants, green stool often shows up when they start eating pureed vegetables or when mild stomach bugs speed up digestion.

When Green Stool Signals a Problem

A single green bowel movement, or even a few days of green stool after eating a lot of spinach or starting a new supplement, is not a concern. The Mayo Clinic recommends contacting a healthcare professional if green stool persists for more than a few days without an obvious dietary explanation.

Green stool paired with diarrhea deserves closer attention because of dehydration risk, especially in young children and older adults. If green diarrhea comes with fever, severe abdominal pain, or blood in the stool, that pattern points toward an infection or inflammatory condition that needs evaluation. The green color alone is rarely the issue. It’s the combination of green with other symptoms that matters.