Melena is the medical term for black, tarry stools caused by bleeding in the upper digestive tract. Diagnosing melena involves confirming that the dark stool actually contains blood (rather than being caused by certain foods or medications), then identifying where in the digestive tract the bleeding is coming from. The process typically moves from a physical exam and blood work to an endoscopy, which lets doctors visually locate the source of bleeding.
What Melena Looks Like and Why It Happens
Melena produces stools that are distinctly black and sticky, often compared to tar in both color and consistency. This appearance comes from a chemical change: hemoglobin, the protein in red blood cells, gets broken down by digestive enzymes as blood travels through the gastrointestinal tract. The longer blood sits in the digestive system, the darker it becomes. Roughly 100 to 200 milliliters of blood in the upper GI tract is needed to produce melena, and stools can remain black for several days even after the bleeding has stopped.
This is different from hematochezia, which is bright red blood in the stool. Bright red blood typically comes from a source lower in the digestive tract, like the colon or rectum, where blood doesn’t have time to be broken down. Melena almost always signals bleeding from higher up: the esophagus, stomach, or the first part of the small intestine.
Common Causes of Upper GI Bleeding
The most frequent cause of melena is peptic ulcer disease, where an ulcer in the stomach or the duodenum (the first section of the small intestine) erodes into a blood vessel. Other common sources include swollen, ruptured veins in the esophagus or stomach, which are often related to liver disease, and tears in the esophageal lining caused by violent or repeated vomiting.
Ruling Out Non-Bleeding Causes First
Not every black stool means bleeding. Several common substances can turn stool dark enough to mimic melena. Iron supplements, bismuth-based medications like Pepto-Bismol, and activated charcoal all produce black stools. So can foods like black licorice, blueberries, and blood sausage. A key difference is that these stools are typically dark without the characteristic tarry, sticky texture of true melena, and they won’t test positive for blood.
This is why one of the first steps in diagnosing melena is a stool test that checks for the presence of hidden (occult) blood. If you’re taking any of these substances, your doctor will want to know, since it changes the urgency of the workup entirely.
The Initial Assessment
When you report black, tarry stools, the evaluation usually begins with a physical exam that includes a digital rectal exam. This allows a provider to see the stool directly and assess its color and consistency. If blood is present, it points toward disease somewhere in the intestinal tract and prompts further testing.
Blood work plays an important role early on. A complete blood count shows whether you’ve lost enough blood to become anemic. Doctors also look at the ratio between two kidney-related markers in your blood: blood urea nitrogen (BUN) and creatinine. When blood is digested in the upper GI tract, it gets absorbed as protein, which raises BUN levels. A BUN-to-creatinine ratio above 30 is a useful signal that the bleeding is coming from the upper digestive tract rather than the lower, and it helps guide the next steps before an endoscopy is even performed.
Endoscopy: The Primary Diagnostic Tool
The definitive way to diagnose the source of melena is an upper endoscopy, also called an EGD (esophagogastroduodenoscopy). During this procedure, a thin, flexible tube with a camera is passed through your mouth and down into your esophagus, stomach, and duodenum. It lets doctors see the lining of the upper digestive tract directly, identify the bleeding site, and often treat it during the same procedure by cauterizing a vessel or applying clips.
If needed, the doctor can also take small tissue samples (biopsies) during the endoscopy to check for conditions like infection or abnormal cell growth. This is especially important when the source of bleeding isn’t an obvious ulcer or tear.
How Urgency Is Determined
Not every case of melena requires emergency treatment. Doctors use scoring systems to assess how serious the bleeding is and whether you need to be admitted to the hospital or can safely be evaluated as an outpatient. One widely used tool, the Glasgow-Blatchford Score, factors in blood pressure, heart rate, hemoglobin levels, and other markers to produce a risk score.
Patients who score zero on this scale, meaning their vital signs are stable and blood counts are normal, can often be safely discharged and scheduled for an outpatient endoscopy. In validation studies, all patients with a score of zero showed no active bleeding when scoped. On the other hand, patients scoring above 6 frequently need blood transfusions and urgent endoscopy within 24 hours. In one study, 86% of patients in that higher-risk group required emergency endoscopy. The average transfusion need for those patients was 3 units of red blood cells.
This scoring system helps doctors move quickly for high-risk patients while avoiding unnecessary hospital stays for those with minor or self-limited bleeding.
What to Expect During the Workup
If you go to the emergency room or your doctor’s office with melena, the first priority is assessing how stable you are. You’ll likely have your blood pressure and heart rate checked, blood drawn for lab work, and a rectal exam performed. If your vital signs suggest significant blood loss (fast heart rate, low blood pressure, lightheadedness), the focus shifts to stabilization before diagnostic procedures.
For stable patients, an endoscopy is typically scheduled within 24 hours. You’ll be sedated for the procedure, which usually takes 15 to 30 minutes. Most people go home the same day. If the source of bleeding is found and treated during the endoscopy, follow-up often involves medication to help the area heal, such as acid-reducing drugs for ulcers, along with repeat testing to confirm the bleeding has stopped.

