Black, tarry stools are usually a sign of bleeding somewhere in the upper digestive tract, typically the esophagus, stomach, or the first part of the small intestine. The medical term is melena, and the distinctive color comes from blood that has been broken down by stomach acid and gut bacteria during its journey through the digestive system. It takes roughly 100 to 200 milliliters of blood (about half a cup) in the upper GI tract to produce visibly black stool, and the stool can remain dark for several days even after the bleeding has stopped.
Why Blood Turns Stool Black
When blood enters the stomach, gastric acid converts hemoglobin (the oxygen-carrying protein in red blood cells) into a compound called hematin, which is dark black. As the partially digested blood continues through the intestines, bacteria further break down the hemoglobin, deepening the color. This process also gives melena its characteristically sticky, tar-like texture and a strong, distinctive odor that’s noticeably different from normal stool.
The black appearance specifically signals upper GI bleeding because the blood needs prolonged contact with stomach acid and intestinal bacteria to undergo this chemical transformation. Bleeding from the lower intestines or colon typically doesn’t have time for this process, so it shows up as bright red or maroon-colored blood instead.
Common Causes
Peptic ulcers are the most frequent cause. These are open sores in the lining of the stomach or duodenum (the first section of the small intestine) that erode into a blood vessel. Ulcers are usually caused by a bacterial infection or long-term use of anti-inflammatory painkillers like ibuprofen or aspirin.
Other common causes include:
- Severe inflammation of the stomach lining (gastritis) or esophagus (esophagitis), often from acid reflux, alcohol, or medication irritation
- Erosion of the stomach lining from stress, critical illness, or heavy alcohol use
- Swollen, ruptured veins in the esophagus or stomach, called varices, which are most common in people with liver disease
- A tear in the esophagus caused by forceful or prolonged vomiting
- Cancers of the stomach, esophagus, or pancreas
- A perforation or tear in the wall of the GI tract
Less commonly, conditions that affect blood clotting or blood-thinning medications can contribute to or worsen upper GI bleeding.
Foods and Medications That Mimic Melena
Not every black stool means internal bleeding. Several everyday substances can turn stool dark enough to cause alarm. Iron supplements are one of the most common culprits. Bismuth-based medications like Pepto-Bismol also produce strikingly dark stools. Activated charcoal has the same effect.
Certain foods can do it too: black licorice, blueberries, and blood sausage can all darken stool significantly. The key difference is texture and smell. Stool darkened by food or medication is typically firm and formed, not sticky or tar-like, and it lacks the strong, foul odor that accompanies digested blood. If you’ve recently taken iron pills or Pepto-Bismol, that’s likely the explanation, but if you haven’t and the stool is genuinely tarry and foul-smelling, it warrants prompt attention.
Warning Signs That Need Immediate Attention
Black tarry stools on their own should always be evaluated, but certain accompanying symptoms point to significant blood loss that requires emergency care. When enough blood is lost quickly, the body goes into a state of circulatory shock. Early signs include a rapid or weak pulse, lightheadedness, pale or clammy skin, and feeling unusually anxious or confused.
More advanced blood loss produces cold, sweaty skin, rapid shallow breathing, little or no urine output, severe weakness, and in serious cases, loss of consciousness. If you’re passing black tarry stools alongside any of these symptoms, that combination suggests active, heavy bleeding. Vomiting blood (which can look bright red or resemble dark coffee grounds) alongside melena is another clear signal that bleeding is significant.
How Bleeding Is Located and Assessed
The gold-standard test for finding the source of upper GI bleeding is an upper endoscopy, where a thin, flexible camera is passed through the mouth into the esophagus, stomach, and duodenum. This lets doctors see the exact location of bleeding and, in many cases, treat it during the same procedure by cauterizing the vessel or clipping the tissue closed.
Before endoscopy, doctors assess how urgently you need intervention. A scoring system called the Glasgow-Blatchford Score helps categorize risk. Patients who score very low (0 to 1) on this scale are at minimal risk and may not need emergency endoscopy or even hospital admission. They can be safely discharged with instructions to return if symptoms worsen. Patients with higher scores, especially those with unstable blood pressure, a fast heart rate, or active vomiting of blood, are typically scoped within 12 hours.
In most cases, endoscopy is performed within 24 hours of arriving at the hospital. Before the procedure, you’ll likely receive intravenous fluids to stabilize your circulation and medications to reduce stomach acid production, which helps slow bleeding and improves the doctor’s ability to see the source clearly.
How Melena Differs From Other GI Bleeding
The location of bleeding determines what you see. Black tarry stools specifically signal upper GI bleeding, meaning the blood originated above or near the beginning of the small intestine. Bright red blood in the stool, called hematochezia, usually comes from the lower GI tract: the colon, rectum, or hemorrhoids. Vomiting blood, which can appear bright red or dark and grainy like coffee grounds, also points to an upper GI source but suggests more rapid or proximal bleeding.
One important detail: melena can persist for days after the actual bleeding has stopped, because residual digested blood continues working its way through the intestines. So a single episode of black stool followed by normal-colored stool over the next day or two may reflect a bleed that has already resolved on its own. Repeated or worsening black stools, on the other hand, suggest ongoing blood loss.

