If you take a look in the toilet bowl and see blue poop, it’s easy to get worried. Blue is far from the usual stool color, but it isn’t usually a cause for concern. Most of the time, blue stool is due to blue pigments or dyes that come out when your food is digested.

Poop gets its color from the breakdown of bile in your liver that turns brown as it goes through chemical changes in the body. However, poop can easily come out as other colors, especially when you eat a food that is blue or dyed with blue food coloring. However, if you aren’t sure if your poop is blue or black, it may be best to see a doctor as black stool could indicate a problem with bleeding.

A “normal” stool can range in color from brown to tan to dark green. However, there are some instances where your poop may appear blue. This is usually due to something you ate that was either blue or purple in color. Examples of foods that may cause your stool to appear blue include:

  • blueberries
  • blue liquor or grape soda
  • currants
  • foods made with blue food coloring, such as blue icing or blue velvet cake
  • grapes
  • plums
  • imitation blueberries, such as the ones that come in muffin mixes
  • raisins

Someone may also have blue stool by taking the medication Prussian blue (Radiogardase). This is a medication used to remove radioactive compounds from a person’s body. If you take this medicine, it’s likely that your stool will be blue in color. Since this medication is prescribed for a few weeks to a month, stool may look blue for some time.

There’s also a very rare cause of blue or blue-purple stool known as porphyria. This is a rare condition that affects your ability to break down heme, a compound in the body that has iron. In addition to purple or blue stool and urine, a person with porphyria may have symptoms such as:

Blue-green poop

Sometimes it’s hard to tell if your stool looks blue or green. However, green or blue-green stool is a lot more common than blue stool. Stool may appear green or blue-green from:

  • bile that passes too quickly through the intestinal tract
  • diarrhea
  • formula in infants
  • eating foods that are colored green, such as drinks, frostings, and gelatin
  • iron supplements
  • eating leafy vegetables and spinach

If green stool continues beyond a few days and it’s not due to iron supplements or lots of greens in your diet, you may want to see a doctor. This is especially true if you’re having other digestive symptoms such as nausea or changes in your stool’s consistency.

Children, especially babies, may not have all the same digestive enzymes as adults, which can change the color and consistency of their stool. They also have different diets, such as breast milk or formula. Children may also be adventurous eaters, sometimes eating toys they’ve confused for foods.

Things children may eat that can cause blue poop include:

  • blueberries
  • crayons
  • food coloring
  • clay

If you’re concerned about potential poisoning, you can call the American Association of Poison Control Centers at 800-222-1222 and ask them about the potential complications of what your child ate.

While blue poop is usually harmless, you can usually cut back on seeing this vibrant hue by eliminating foods with added chemical dyes or food coloring. Most of these don’t have any nutritional or health benefit, so you won’t usually have to compensate with other nutrients.

To promote the movement of stool and get rid of seeing blue, you can:

If you aren’t sure what color you see in your poop, you may need to check with a doctor. This is especially true if it could be black or have the consistency of coffee grounds, which could indicate you have old blood in your stool.

Stool that’s dark red or has blood-tinged streaks could be a sign of an emergency due to bleeding in your digestive tract and will need to be evaluated by a doctor.

Blue stool that appears once or twice after you ate something blue usually isn’t cause for concern. But if your stool is blue for several days, speak with a doctor. Keeping a food journal of what you eat may help your doctor evaluate potential causes.

Blue stool may be visually alarming, but isn’t usually cause for concern. However, if you have a little one who may be eating toys instead of playing with them, it’s best to call your child’s doctor or Poison Control to ensure it won’t affect their health.