Why Was My Pee Green? Causes & When to Worry

Green urine is almost always caused by something you ate, drank, or took as medication. It looks alarming, but in most cases, it’s harmless and clears up on its own within a day or two. Less commonly, green urine can signal a bacterial infection or a liver problem, especially when other symptoms are present.

Food Dyes Are the Most Common Cause

Brightly colored synthetic food dyes are the number one reason urine turns green. These dyes pass through your digestive system, get filtered by your kidneys, and end up in the toilet bowl. Blue and green dyes are the usual culprits, since blue pigment mixed with the natural yellow of urine produces a vivid green.

Think about what you consumed in the last 12 to 24 hours. Green frosting on a cupcake, blue sports drinks, brightly colored candy, green beer on St. Patrick’s Day, lime gelatin, or popsicles can all do it. Even foods you wouldn’t suspect, like certain breakfast cereals or flavored drinks, contain enough dye to change urine color. The effect typically fades once your body finishes processing the dye, usually within one to two trips to the bathroom after you stop eating the trigger food.

Medications That Turn Urine Green

Several prescription and over-the-counter medications can cause green urine. The list includes amitriptyline (a common antidepressant), indomethacin (a pain reliever used for gout and arthritis), cimetidine (a heartburn medication), promethazine (used for nausea and allergies), and metoclopramide (a drug for stomach motility problems). Each of these produces metabolites that, once filtered through the kidneys, carry a blue or green tint.

Methylene blue deserves special mention because it’s found in some combination urinary pain relievers. If you’ve recently started taking a bladder analgesic, check the label. Methylene blue is filtered directly by the kidneys and excreted in urine, with the color change peaking about 2 to 6 hours after you take a dose. The discoloration can remain detectable for over 24 hours.

Propofol, the anesthetic used during surgeries and procedures, can also cause green urine. This happens in less than 1% of patients who receive it. The color comes from water-soluble metabolites of the drug that get excreted through the kidneys. If you recently had a medical procedure involving sedation and noticed green urine afterward, propofol is the likely explanation, and it resolves on its own.

Bacterial Infections

A urinary tract infection caused by Pseudomonas bacteria can turn urine green. This particular bacterium produces two pigments, pyocyanin (blue-green) and pyoverdin (yellow-green), that dissolve directly into urine. Pseudomonas UTIs are uncommon in otherwise healthy people. They’re seen more often in hospitalized patients, people with catheters, or those with weakened immune systems.

The key difference between a food dye situation and an infection is the presence of other symptoms. With a Pseudomonas UTI, you’d typically also have burning during urination, a frequent urgent need to go, cloudy or foul-smelling urine, or fever. Green urine that shows up alongside any of these symptoms warrants a urine culture to check for bacteria.

Liver and Bile Problems

Your liver produces a green pigment called biliverdin as part of the normal breakdown of red blood cells. Biliverdin is usually converted quickly into bilirubin (a yellow pigment) and excreted through bile into your intestines. When something blocks that normal pathway, like a bile duct obstruction or liver failure, biliverdin can build up and spill into the bloodstream, eventually showing up in urine.

This is rare, and you wouldn’t miss the other signs. Elevated biliverdin levels cause a greenish tint to the skin and the whites of the eyes, not just the urine. Severe abdominal pain, jaundice (yellowing of the skin), pale stools, and dark or discolored urine appearing together point to a bile or liver issue that needs prompt evaluation.

Green Urine in Children

In kids, food dyes are by far the most common explanation. Children consume more brightly colored foods relative to their body weight, so the effect can be more pronounced. However, there’s one unusual pediatric cause worth knowing about. A case published in The Journal of Pediatrics described a toddler whose green urine on diapers turned out to be a sign of hemolytic anemia, a condition where red blood cells break down faster than normal. The green color appeared because the rapid breakdown of red blood cells overwhelmed the normal pigment-processing pathway, producing excess biliverdin in the urine.

In that case, the child also had fever, and lab tests showed blood and protein in the urine. Green urine in a child who is otherwise acting normally and eating colorful foods is almost certainly harmless. Green urine in a child who also has a fever, looks pale, or seems unusually tired is a different situation and worth a pediatrician visit.

How to Figure Out Your Cause

Start with the simplest explanation. Run through this mental checklist:

  • Food or drink in the last 24 hours: Anything with bright blue or green coloring, including sports drinks, candy, frosted baked goods, or artificially colored foods.
  • New medications or supplements: Check labels for methylene blue, or look up whether any medication you recently started is on the list above.
  • Recent medical procedure: If you were sedated in the last day or two, propofol is the likely answer.
  • Other symptoms: Burning, urgency, fever, abdominal pain, or jaundice alongside green urine shifts the likelihood toward infection or a liver issue.

If the green color showed up once and goes away after your next few bathroom trips, you almost certainly ate or drank something with a strong dye. If it persists for more than two days with no obvious dietary explanation, or if it comes with pain, fever, or other changes, that’s when it makes sense to get a urine test. The test is simple and can quickly rule out infection or blood in the urine.