What Causes Blue Urine? Medications, Dyes & More

Blue urine is almost always caused by something you swallowed, were injected with, or absorbed through a feeding tube. The single most recognized trigger is methylene blue, a medical dye and treatment that has been turning patients’ urine vivid shades of blue for well over a century. Other medications, artificial food colorings, and surgical dyes account for most remaining cases. In rare situations, a bacterial infection or an inherited metabolic condition can produce blue or blue-tinged urine, and the precise shade often helps clinicians narrow down the cause.

Methylene Blue, the Classic Culprit

Methylene blue holds a unique place in medicine. It is used to treat methemoglobinemia, a condition in which hemoglobin loses its ability to carry oxygen effectively, and it doubles as a tissue-marking dye during surgery. It has also been tried historically against malaria, gonorrhea, and even diabetes. Regardless of why it is given, your kidneys filter much of it out in a form that is still deeply colored, and the result is urine that can look anything from bright cerulean to dark teal.

This effect was documented as far back as the early 1900s. A historical JAMA report described urine “of a peacock-blue color” in a patient whose intestinal bacteria were producing indigo, and noted that blue urine had been “observed in those taking methylene-blue” for various ailments.1JAMA. BLUE URINE The color change is not harmful to the kidneys or bladder and clears within a day or two of stopping the drug. If a doctor tells you that you will be receiving methylene blue, the single most predictable side effect is the startling toilet bowl afterward.

Other Medications That Shift Urine Toward Blue or Green

Methylene blue is the headliner, but several other prescription drugs push urine into the blue-green range. None of them tend to produce the same vivid, unmistakable blue, yet the change is noticeable enough to alarm people who are not expecting it.

  • Indomethacin: This nonsteroidal anti-inflammatory, often prescribed for gout or joint pain, has been reported to cause rare blue-green discoloration of urine, particularly at higher doses.2Nephrology. Rare blue-green urine due to excess indomethacin
  • Propofol: The widely used intravenous anesthetic can turn urine green. This happens in fewer than one percent of patients who receive it and is attributed to phenol-based metabolites that the body excretes through the kidneys.3PubMed Central. Green Urine Due to Propofol: A Case Report with Review of Literature The discoloration is not toxic and reverses after the drug is discontinued.4PubMed Central. Green urine: A cause for concern?
  • Amitriptyline: This older tricyclic antidepressant has been linked to green or blue-green urine in scattered case reports.4PubMed Central. Green urine: A cause for concern?
  • Promethazine and cimetidine: Promethazine (an antihistamine used for nausea) and cimetidine (an older heartburn drug) round out the list of medications cited in clinical literature as occasionally causing greenish urine.4PubMed Central. Green urine: A cause for concern?

Whether the urine looks more blue or more green depends on the drug itself, how concentrated the urine is, and individual variation in how your liver and kidneys process the compound. More concentrated urine tends to look darker and greener, while dilute urine in someone taking methylene blue can appear strikingly blue. In all of these medication-related cases, the color change does not signal kidney damage and goes away once treatment ends.

Food Dyes and Tube Feedings

Outside of prescription drugs, artificial food dyes are the next most common explanation. FD&C Blue No. 1, known in the food industry as Brilliant Blue FCF, is the blue colorant in countless processed foods, sports drinks, and candy. In normal amounts eaten by mouth, very little gets absorbed into the bloodstream. Most of it passes straight through your digestive system, which is why it can turn your stool greenish but rarely affects urine color.

The situation changes when the dye enters the body through an enteral feeding tube. In a survey of dietitians and physicians who managed tube-fed patients, roughly 42 percent of dietitians and 20 percent of physicians reported having observed at least one case of body or fluid discoloration that they attributed to FD&C Blue No. 1 absorption from tube feedings. Discoloration appeared in skin, urine, and even pleural fluid in patients with chest tubes.5Pulmonary & Critical Care Medicine. Absorption of FD&C Blue No. 1 from enteral feedings: A look back at a patient safety effort with modern relevance Critically ill patients often have compromised gut-barrier function, which lets more dye cross into the bloodstream and ultimately reach the kidneys. The resulting blue-green urine or blue-tinged skin can be alarming if the clinical team is not aware that the feeding formula contains the dye.

For otherwise healthy people, drinking a large volume of a deeply blue-colored beverage or eating a lot of blue candy on a dare can occasionally produce faintly blue or green-blue urine. The effect is temporary, harmless, and mostly a cocktail-party story.

Diagnostic and Surgical Dyes

In the operating room, surgeons sometimes need to confirm that the ureters (the tubes connecting the kidneys to the bladder) are intact and not accidentally injured during pelvic or abdominal procedures. Indigo carmine, a blue dye given intravenously, travels quickly to the kidneys and tints the urine blue so that any leaking ureter becomes visible under direct inspection.4PubMed Central. Green urine: A cause for concern? The typical protocol involves a small intravenous dose diluted in saline, administered by the anesthesia team during the procedure.6European Journal of Obstetrics & Gynecology and Reproductive Biology. Indigo carmine dye for detecting urinary track damage during vaginal surgery

If you wake up from surgery and notice blue urine in your catheter bag or the first time you use the bathroom, indigo carmine is the most likely explanation. The dye clears within hours, and the color fades as your kidneys flush it out. Methylene blue is also sometimes used as a surgical dye for similar purposes, which means it too can appear post-operatively. Either way, blue urine in the immediate aftermath of surgery is expected and does not mean anything has gone wrong.

Bacterial Infections and Purple Urine Bag Syndrome

Not all blue-tinged urine comes from something you were given deliberately. In people with long-term urinary catheters, a striking condition called purple urine bag syndrome (PUBS) can turn the catheter bag and tubing a vivid purple. Purple is what you get when blue and red mix, and the biochemistry behind PUBS involves exactly that: two pigments, one blue and one red, both produced by bacteria in the urinary tract.

The process begins with tryptophan, an amino acid found in many foods. Gut bacteria convert some tryptophan into a compound called indoxyl sulfate, which the kidneys excrete into the urine. When certain bacteria colonize the urinary catheter system, they break down indoxyl sulfate into two pigments: indigo, which is blue, and indirubin, which is red.7PubMed Central. Enzymatic degradation of urinary indoxyl sulfate by Providencia stuartii and Klebsiella pneumoniae causes the purple urine bag syndrome Indigo tends to settle on the surface of the plastic, while indirubin dissolves into it, and the combination stains the bag and tubing purple.8PubMed. Purple urine bag syndrome

The bacteria most commonly responsible include Providencia stuartii and Klebsiella pneumoniae, though other species have been implicated.7PubMed Central. Enzymatic degradation of urinary indoxyl sulfate by Providencia stuartii and Klebsiella pneumoniae causes the purple urine bag syndrome PUBS is most common in elderly, catheterized patients, especially those who are bedridden or have chronic constipation (which increases the time gut bacteria have to produce tryptophan metabolites). The color change results from altered metabolism of tryptophan into these pigments by bacteria that produce specific enzymes.9PubMed Central. Purple Urine Bag Syndrome: An Unusual Presentation of Urinary Tract Infection Pseudomonas infections of the urinary tract can also occasionally produce green-colored urine through a similar pigment-producing mechanism.10PubMed. Green urine due to Pseudomonas urinary tract infection: An unusual occurence

While PUBS looks dramatic, it is usually considered a sign of bacterial colonization of the catheter rather than a dangerous systemic infection. Treatment typically involves changing the catheter, addressing any underlying urinary tract infection with antibiotics if needed, and managing constipation. The purple color itself is not harmful, but it signals that bacteria are active in the urinary system and should not be ignored.

Blue Diaper Syndrome

In rare cases, blue-stained urine has a genetic origin. Blue diaper syndrome is a condition first described in the 1960s, named for the blue-stained diapers observed in affected infants. The longstanding theory was that these babies had a defect in tryptophan absorption in the intestines. When tryptophan is not properly absorbed, gut bacteria convert it into indole compounds, which are then excreted in the urine and oxidize to form blue indigo pigment on exposure to air.

For decades, no one identified the genetic mutation responsible. A report in Pediatrics described a boy who presented with neonatal-onset diarrhea, metabolic acidosis, episodes of low blood sugar, and blue-stained urine spots in his diapers, and the investigators linked his condition to mutations in the PCSK1 gene.11PubMed. Blue Diaper Syndrome and PCSK1 Mutations This was a significant step forward, since prior to this finding, no genetic cause had been confirmed and the tryptophan-malabsorption explanation lacked functional evidence. The condition remains extremely rare, and the blue urine is typically just one symptom among broader metabolic problems that need treatment.

Why the Shade Varies So Much

If you search online for blue urine, you will find photographs ranging from electric blue to teal, aquamarine, deep green, and outright purple. This range is not random. Several factors determine the final color:

  • The substance itself: Methylene blue produces a true blue. Propofol metabolites lean green. The bacterial pigments behind PUBS create blue plus red, yielding purple.
  • Urine concentration: Dehydrated, concentrated urine darkens the shade. Well-hydrated, dilute urine lets more of the original pigment color show through.
  • pH: Urine acidity can shift some dyes along the color spectrum. Methylene blue, for example, looks slightly different at different pH levels.
  • Mixing with normal pigments: Normal urine is yellow due to a pigment called urochrome. When you add a blue dye to yellow urine, you often get green. Only when the blue pigment is strong enough to overpower the yellow does the urine look truly blue.

This is why propofol, amitriptyline, and indomethacin are usually described as causing “green” urine rather than blue. They produce blue-ish metabolites, but the background yellow of normal urine blends with them to yield green. Methylene blue and FD&C Blue No. 1 are intense enough colorants that they can overwhelm the yellow and produce genuinely blue urine even at moderate concentrations.

When Blue Urine Deserves a Doctor’s Attention

Most blue or blue-green urine is harmless and resolves on its own, but there are situations where you should not just shrug it off.

If you can trace the color to an obvious cause, like having surgery earlier that day, starting methylene blue treatment, or eating an absurd quantity of blue-frosted cupcakes, you probably do not need to do anything beyond waiting for it to pass. Clinical reviews emphasize that taking a careful history of medications, diet, and recent procedures is the single most useful step in identifying the cause of abnormal urine color and distinguishing harmless causes from potentially pathological ones.12PubMed Central. Diagnostic Approach to Abnormal Urine Colors: Lessons From a Case of Blue-Green Urine

You should contact a doctor if the blue or green color appears without any identifiable dietary or medication cause, if it persists for more than a couple of days, if it is accompanied by pain, fever, or foul-smelling urine (which could point to a urinary tract infection), or if you notice other symptoms like skin discoloration or unusual fatigue. In catheterized patients, a purple or blue tinge in the collection bag warrants alerting the care team, since it signals bacterial activity that may require catheter replacement or antibiotic treatment.

For parents who notice blue-stained diapers in a newborn, this is worth an urgent call to the pediatrician. Blue diaper syndrome is vanishingly rare, but the underlying metabolic issues it signals need prompt evaluation.

Asparagus, Beets, and the Broader World of Urine Color Changes

Blue urine gets a lot of attention precisely because it is unusual. Other dietary and drug-induced color changes are far more common and offer useful context for anyone who has just been startled by the color of their toilet bowl.

Beets and blackberries can turn urine pink or reddish, a phenomenon called beeturia that affects a variable percentage of people depending on stomach acidity and genetics. Rifampin, an antibiotic used for tuberculosis, can turn urine bright orange. B vitamins, especially riboflavin, produce a neon yellow that alarms people who have just started a multivitamin. Asparagus famously gives urine a strong odor and can contribute a mild greenish tint.4PubMed Central. Green urine: A cause for concern?

The general principle across all these cases is the same: the body filters out colored metabolites through the kidneys, and those metabolites tint the urine. True red urine that is not explained by food or medication, on the other hand, may contain blood (hematuria) and always warrants medical evaluation. Brown or cola-colored urine can signal liver problems or muscle breakdown. These colors sit in a different category of clinical urgency than the blues and greens, which almost always trace back to something benign. The color of your urine is surprisingly informative, but only if you know which shades deserve worry and which ones just mean you ate something interesting.