Green stool is almost always harmless. The most common causes are eating green vegetables, consuming foods with green dye, taking iron supplements, or having a bout of diarrhea that moves food through your gut faster than usual. Occasionally, green poop signals an infection or digestive issue worth investigating, but for most people, the color returns to normal within a day or two.
Why Stool Is Normally Brown
Your liver produces bile, a bright green-yellow fluid that helps break down fats. As bile travels through the small intestine and into the colon, bacteria go to work on it, converting it through several chemical steps into a pigment called fecobilinogen. That pigment is what gives stool its characteristic brown color. The entire process takes time, and the longer digested food spends in your intestines, the more completely that green bile transforms into brown pigment.
When anything speeds up that transit, whether it’s diarrhea, a stomach bug, or simply a meal that moves through quickly, bile doesn’t get fully converted. The result is stool that still carries a greenish tint. This is the single most common explanation for unexpectedly green poop, and it’s completely benign.
Foods and Drinks That Turn Stool Green
The simplest cause is dietary. Leafy greens like spinach, kale, and broccoli contain chlorophyll, and eating a large serving can tint your stool noticeably green. The same goes for green food coloring found in drink mixes, ice pops, candy, frosting, and some cereals. If you recently ate something very green or brightly dyed, that’s likely your answer.
Smoothies and juice cleanses are a frequent culprit because they concentrate large volumes of greens into a single sitting. Matcha, spirulina, wheatgrass, and chlorella supplements can all do the same. The color change usually shows up within 12 to 24 hours of eating the food and resolves just as quickly once it’s out of your system.
Iron Supplements and Medications
Iron supplements are one of the most reliable causes of dark green (sometimes nearly black) stool. This color change is normal and some physicians actually consider it a sign the supplement is being absorbed effectively. If the color bothers you, lowering the dose with your doctor’s guidance typically resolves it.
Antibiotics can also produce green stool, but through a different mechanism. They reduce the population of gut bacteria responsible for converting bile into its brown pigment. With fewer bacteria doing that job, stool retains more of its original green bile color. This effect usually fades once you finish the course of antibiotics and your gut bacteria recover.
Infections That Cause Green Stool
Certain infections speed up digestion dramatically, and that rapid transit is what produces the green color. Bacteria like Salmonella, the parasite Giardia, and viruses like norovirus all trigger the gut to flush its contents faster than normal. The diarrhea these infections cause doesn’t give bile enough time to change color, so what comes out is loose, watery, and green.
Infection-related green stool is almost always accompanied by other symptoms: cramping, nausea, fever, or multiple episodes of diarrhea in a short period. If your green stool is formed and solid and you feel fine otherwise, an infection is unlikely. If you’re experiencing watery diarrhea with fever or abdominal pain that lasts more than two or three days, that combination is worth getting checked out. A simple stool culture can identify the specific organism involved.
Green Stool in Babies
Parents notice green stool in babies frequently, and it’s almost always normal. In the first couple of days after birth, babies pass meconium, a sticky, tar-like substance that’s dark green to black. This is expected and clears within 48 hours or so.
For breastfed babies, frothy green stool can happen when the baby feeds from both breasts in quick succession without fully draining one side first. The fix is simple: let the baby finish one breast before switching. Formula-fed babies commonly have dark green stool because of the iron content in formula, which is nothing to worry about. Once you start introducing solid foods, you’ll see a whole new range of colors in the diaper, including green and brown shades that reflect whatever your baby ate most recently.
How Long Green Stool Should Last
Diet-related green stool typically resolves within one to two bowel movements once the food clears your system. If you’re taking iron supplements, the color will persist for as long as you take them. After a stomach bug, green stool usually returns to brown within a few days as your digestion slows back to its normal pace.
Persistent green stool lasting more than a few weeks, especially when paired with ongoing diarrhea, weight loss, or visible mucus, can point toward malabsorption issues where your body isn’t properly breaking down or absorbing nutrients. In these cases, food moves through too quickly on a chronic basis, and the underlying cause needs attention. But for the vast majority of people who glance into the toilet and wonder what happened, the answer is something they ate, something they took, or a temporary digestive speedup that will correct itself.

