Green diarrhea usually means food moved through your digestive system too quickly for your body to finish processing it. Bile, the digestive fluid your liver produces, starts out green. Normally it changes to brown as bacteria in your intestines break it down over the course of roughly two days. When diarrhea speeds everything up, bile doesn’t have time to complete that color change, and your stool comes out green.
Why Bile Makes Your Stool Green
Your liver continuously produces bile to help digest fats. This fluid gets its initial yellow-green color from bilirubin, a pigment created when your body recycles old red blood cells. As bile travels through your intestines, bacteria convert bilirubin into other compounds that eventually oxidize into stercobilin, the pigment responsible for the typical brown color of stool.
That conversion process takes time. Normal whole-gut transit (the time it takes food to travel from mouth to exit) averages around 53 hours. In people with diarrhea, that drops to roughly 35 hours. The small intestine portion alone can speed up from about 4.2 hours to 3.3 hours. When transit accelerates this much, bacteria simply don’t get enough contact time with bile to finish the chemical transformation, so the stool retains its original green tint.
Infections That Cause Green Diarrhea
Stomach bugs are one of the most common reasons for sudden green diarrhea. Bacterial infections like Salmonella and certain strains of E. coli irritate the intestinal lining, triggering rapid contractions that push everything through before bile can be fully processed. Viral gastroenteritis (the common “stomach flu”) does the same thing. Parasitic infections, particularly Giardia from contaminated water, can also produce green, watery stools that persist for weeks if untreated.
If your green diarrhea came on suddenly with cramping, nausea, or fever, an infection is the most likely explanation. The green color itself isn’t the concern in these cases. What matters is how long it lasts and whether you’re staying hydrated.
Foods and Drinks That Turn Stool Green
Sometimes the green color has nothing to do with speed. You may have simply eaten something with strong green pigment. Chlorophyll, the compound that makes plants green, can color your stool the same way. Common culprits include spinach, kale, broccoli, avocados, herbs, matcha, pistachios, and blueberries (which can produce green as well as blue-purple shades).
Artificial food coloring is another frequent cause. Brightly frosted cupcakes, green candy, or drinks with food dye can tint your stool surprising shades of green that persist until the dye clears your system. If you can trace the timing back to a colorful meal or treat, the green stool is harmless and temporary.
Medications and Supplements
Iron supplements are a well-known cause of dark green or even blackish stools. About 90% of oral iron isn’t absorbed and stays in the intestines, where it oxidizes and darkens stool color. Iron can also cause digestive side effects like nausea, bloating, and diarrhea, so green diarrhea while taking iron supplements is a common combination. Beyond color changes, unabsorbed iron can shift the balance of gut bacteria, favoring certain harmful strains over beneficial ones like Lactobacillus and Bifidobacterium, which may contribute to ongoing digestive upset.
Some antibiotics can also turn stool yellow or green. Antibiotics disrupt the normal bacterial ecosystem in your gut, and since those bacteria are the ones responsible for converting bile from green to brown, fewer of them means the conversion happens less completely. Antibiotic-associated diarrhea compounds the problem by speeding transit time as well.
Green Stool in Babies
Green stool in infants is extremely common and rarely a sign of anything serious. Newborns pass meconium, a dark greenish-black tar-like substance, in their first few days of life. As feeding gets established, stool gradually transitions to yellow or mustard-colored in breastfed babies and tan or yellow-brown in formula-fed babies.
Several things can keep a baby’s stool green beyond those first days. Breastfed babies who don’t finish feeding on one side may get more of the lower-fat foremilk and less of the higher-fat hindmilk, which can affect digestion and produce green stools. Babies on protein hydrolysate formula (used for milk or soy allergies) often have green stool as a normal side effect. Breastfed infants who haven’t yet developed a full population of intestinal bacteria may also produce green stools simply because the bacterial ecosystem needed to process bile isn’t established yet.
When Green Diarrhea Needs Attention
A single episode of green diarrhea after a heavy salad or a stomach bug is not worrisome. The color itself is almost never the problem. What deserves attention is the diarrhea component, particularly if it lasts more than a few days or if you notice signs of dehydration: dark urine, dizziness, dry mouth, or (in children) fewer wet diapers than usual. The Mayo Clinic recommends contacting a healthcare professional if green stool persists beyond a few days.
Fever alongside green diarrhea suggests a bacterial infection that may need treatment. Bloody or black stool mixed with green warrants prompt evaluation, as those colors can indicate bleeding somewhere in the digestive tract. Green diarrhea that keeps coming back over weeks or months, especially with weight loss or abdominal pain, could point to conditions like celiac disease or inflammatory bowel disease that affect nutrient absorption and gut transit.
For most people, though, green diarrhea resolves on its own once the underlying trigger passes. Staying hydrated is the most important thing you can do while it runs its course.

