Eating certain foods can cause a person to have blue poop. People should be aware of their stool and seek medical care if there are any major changes.
People can pass blue stools if they consume food or drink containing blue food coloring or dyes. Some medications and toxic substances may also turn a person’s stool blue.
In some cases, doctors can use this food coloring effect to measure how long a person’s gut takes to process food. This can be a good measure of gut health.
This article discusses what can cause blue stool, treatments for blue stool, and when to contact a doctor about stool.

There are different reasons why a person’s stool may turn blue. These include the foods they eat and certain medications.
Food
Some foods, food colorings, or dyes can cause a person to have blue stools. Scientists have used this effect to study how quickly people process food through their gut, also called gut transit time.
In this 2021 study, researchers asked study participants to eat a standard diet for 1 day. The next day, the participants ate two muffins colored with royal blue food dyes. Eating these muffins eventually turned their stools blue.
Measuring the time between eating the muffins and having blue stools gave the scientists data on how quickly the participants’ guts processed food.
There is little scientific research on which foods turn a person’s stool blue. However, some foods that may cause a person to have blue stool include:
- foods made with blue coloring, such as cakes with blue frosting
- drinks with a blue color, such as:
- liquors colored blue
- grape soda
- fruits, such as:
- blueberries
- grapes
- plums
- artificially blue imitation fruits
Medication
Taking Prussian blue medication may also make a person’s stool blue. Prussian blue is a medication
Doctors prescribe Prussian blue for a minimum of 30 days. People taking this medication may have blue stools for some time. It may also cause other side effects, including upset stomach and constipation.
Other names for Prussian blue include Radiogardase-Cs and Berlin blue. People should take care not to confuse Prussian blue medication with Prussian blue artist’s dye. This type of Prussian blue is not a medication and can harm a person if they ingest it.
Another medication that can turn a person’s stool blue is methylene blue (MB). Doctors may treat a blood condition called methemoglobinemia with MB. MB can make a person’s urine, sweat, and stool turn blue or blue-green.
Blue stool caused by eating certain blue-dyed foods is unlikely to be serious. However, if a person is concerned about their blue stools, they should speak with a healthcare professional.
While blue stool may not typically be cause for concern, other changes in a person’s stool can be a sign of underlying medical issues. If a person notices changes in the frequency, color, and consistency of their stools, they should speak with a healthcare professional.
It typically takes between 24–48 hours for food to leave, or transit, a person’s system. This can include food that turns stool blue. A person may have blue stool during this transit period, despite not eating any more blue dyed foods.
People can aid their digestion by drinking plenty of fluids and trying the following:
- eating more fiber
- eating less fat
- avoiding spicy food
- avoiding carbonated or caffeinated drinks
- consuming probiotics
People should seek urgent medical attention if their stool is:
These symptoms
Blue stools may be the result of eating blue-colored food. If a person is unsure about their stool color symptoms, they should still seek advice from a healthcare professional.
The following are some questions people frequently ask about blue stools.
What is the reason for blue-green stool?
According to research from 2012, blue-green or greenish stool may be due to the following:
- nursing
- bile and food passing too quickly through the gut
- iron supplements
Green stool may also be an indication that a person has a Clostridioides difficile infection.
Some foods can also make a person’s stools green, including:
What is the blue poop challenge?
The blue poop challenge is a way for a person to get important information about their gut health.
To take part, people eat two muffins containing blue dye for breakfast, then track changes in their stool. They can then record their results on healthcare company ZOE’s website to receive personalized insights about their gut microbiome.
How long does it take blue food dye to leave the digestive system?
According to research,blue dye typically takes between 14–58 hours to transit, or leave, a person’s system.
Blue stools are typically caused by eating food or drink containing blue dyes or colorings. People can use this effect to track how quickly their gut processes food. This can also give scientists information on how guts function.
The blue poop challenge can give people important information about their gut health.
Some unusually colored stools may indicate a person has a serious medical condition. If people have stools that are dark red, black or tarry, or bloody, they should seek emergency medical attention.