Melena is the medical term for black, tarry stool caused by bleeding somewhere in the gastrointestinal tract, usually the upper portion. The dark color comes from blood that has been partially digested during its transit through the gut, and the stool often has a distinctly foul, sticky quality that sets it apart from other causes of dark-colored bowel movements. Finding melena on a physical exam is one of the strongest bedside indicators that a person is bleeding from the stomach, duodenum, or esophagus, with one analysis placing the likelihood ratio at 25 for an upper GI source when a clinician confirms melenic stool.1JAMA. Does This Patient Have a Severe Upper Gastrointestinal Bleed? It is not a diagnosis on its own but a signal that something is bleeding and needs investigation.
Why the Stool Turns Black
When blood enters the upper GI tract, it encounters stomach acid and digestive enzymes. Hemoglobin in the blood is broken down into a compound called hematin, which is black. The longer the blood sits in the intestines, the more complete this chemical conversion becomes, which is why bleeding from the stomach or duodenum produces the classic jet-black appearance. The stool also tends to be sticky and almost tar-like in texture, with a pungent odor that experienced clinicians can sometimes recognize across a room.
Not all dark stool is melena. Iron supplements, bismuth-containing medications like Pepto-Bismol, and foods such as black licorice or blueberries can all darken stool without any bleeding. The key difference is usually texture and smell. Melenic stool is loose to semi-formed, shiny, and smells distinctly worse than ordinary dark stool. One study found that when patients were shown a color card and asked to match their stool, those who pointed to the blackest shade had a positive predictive value of 0.95 for upper GI bleeding, outperforming physicians who relied on verbal descriptors like “tarry stools.”2PubMed. An objective measure of stool color for differentiating upper from lower gastrointestinal bleeding If you are unsure whether what you are seeing is melena, a healthcare provider can test the stool for the presence of blood.
The Most Common Causes
Peptic ulcers, meaning open sores in the lining of the stomach or duodenum, are the single most common reason for melena. Two overlapping culprits drive most peptic ulcer bleeding: infection with the bacterium Helicobacter pylori and the use of nonsteroidal anti-inflammatory drugs (NSAIDs) like ibuprofen or aspirin. In one case-control study, ulcer patients were infected with H. pylori at a rate of 72% compared with 42% in controls, and the infection roughly tripled the odds of peptic ulcer bleeding.3PubMed. Helicobacter pylori increases the risk of peptic ulcer bleeding: a case-control study Regular alcohol use independently raised the risk as well, and aspirin or NSAID use was a particularly strong risk factor for gastric ulcer bleeding specifically.
The combination of H. pylori and NSAIDs or low-dose aspirin appears to be worse than either alone. Research has found a synergistic interaction between the infection and low-dose aspirin therapy, meaning the two together magnify the risk of a bleeding ulcer beyond what you would expect by simply adding their individual effects.4The Korean Journal of Helicobacter and Upper Gastrointestinal Research. Risk of Peptic Ulcer Bleeding Associated with Helicobacter pylori Infection, Nonsteroidal Anti-inflammatory Drugs, and Low-dose Aspirin Therapy in Peptic Ulcer Disease: A Case-control Study Even among patients already bleeding from an ulcer after NSAID use, more than half were also harboring H. pylori.5PubMed Central. Helicobacter pylori infection in bleeding peptic ulcer patients after non-steroidal antiinflammatory drug consumption This is why many guidelines recommend testing for the bacterium after an episode of ulcer bleeding, even if the patient was taking NSAIDs at the time.
Beyond Ulcers
Peptic ulcers are the leading cause, but they are far from the only one. Other conditions that can produce melena include:
- Esophageal varices: Swollen veins in the esophagus that develop when blood flow through the liver is obstructed, most often from cirrhosis. Variceal bleeding is a life-threatening complication of portal hypertension and can produce massive, sudden blood loss.6PubMed Central. Portal hypertension and gastrointestinal bleeding: diagnosis, prevention and management
- Mallory-Weiss tears: Lacerations in the lining where the esophagus meets the stomach, typically caused by forceful retching or vomiting. These are strongly associated with heavy alcohol consumption, and patients with advanced liver disease tend to have more severe bleeding from them.7PubMed Central. Distinctive aspects of peptic ulcer disease, Dieulafoy’s lesion, and Mallory-Weiss syndrome in patients with advanced alcoholic liver disease or cirrhosis
- Dieulafoy’s lesion: An abnormally large artery sitting just under the stomach lining that can erode through and bleed profusely. It is uncommon but appears more frequently in people with advanced alcoholic liver disease, and it carries a high mortality in that group.8PubMed Central. Distinctive aspects of peptic ulcer disease, Dieulafoy’s lesion, and Mallory-Weiss syndrome in patients with advanced alcoholic liver disease or cirrhosis
- Tumors and other masses: Both cancerous and benign growths in the stomach or esophagus can bleed. A case report described a gastric leiomyoma, a benign smooth-muscle tumor near the junction of the esophagus and stomach, that caused severe anemia and intermittent dark tarry stools in a 64-year-old woman.9Cureus. Gastric Leiomyoma Near the Gastroesophageal Junction Causing Massive Gastrointestinal Bleeding
- Erosive esophagitis or gastritis: Widespread irritation of the esophageal or stomach lining, sometimes from acid reflux, sometimes from medications or alcohol, can ooze enough blood to produce melena without a discrete ulcer.
Rarer causes include blood-clotting disorders, vascular malformations, and aortoenteric fistulas, where an abnormal connection forms between the aorta and the bowel. Because the list of possible sources is long, identifying the exact site of bleeding usually requires endoscopy or imaging.
When Melena Points to the Small Bowel
Most melena originates in the esophagus, stomach, or duodenum. But in a subset of cases, especially when standard upper endoscopy comes back clean, the bleeding source lies further downstream in the small intestine. These cases fall into the category of “obscure GI bleeding,” and they can be frustrating to pin down because the small bowel is the hardest part of the gut to visualize. One study found that the presence of melena in patients with obscure bleeding doubles the odds that the source is in the proximal small intestine, and the authors recommended starting with an antegrade approach when performing deep enteroscopy in these patients.10PubMed. Presence of Melena in Obscure Gastrointestinal Bleeding Predicts Bleeding in the Proximal Small Intestine Capsule endoscopy, where you swallow a pill-sized camera, is another common tool for surveying the small bowel when the source remains elusive.
How Doctors Assess Severity
When someone shows up with melena, clinicians need to quickly estimate how serious the situation is. Vital signs, mental status, and hemoglobin levels give an initial picture, but several scoring systems have been developed to formalize the risk assessment. The Glasgow-Blatchford Score (GBS) uses readily available information collected before endoscopy, including blood pressure, heart rate, hemoglobin, and the presence of melena itself, to predict who needs intervention. The AIMS65 score and the Rockall score are alternatives that incorporate different variables.
A European comparison of all three found that they performed similarly when predicting in-hospital mortality, with areas under the curve hovering around 0.76 to 0.78. But they diverged in other respects. The Glasgow-Blatchford Score was better at predicting who would need a blood transfusion, and it outperformed AIMS65 at predicting rebleeding. A GBS of 1 or below effectively ruled out high-risk patients for a composite endpoint of poor outcomes, while an AIMS65 of zero could not do the same.11PubMed Central. Comparison of AIMS65, Glasgow-Blatchford score, and Rockall score in a European series of patients with upper gastrointestinal bleeding: performance when predicting in-hospital and delayed mortality The practical upshot is that a very low GBS can sometimes help identify patients safe enough to be evaluated as outpatients, sparing them an unnecessary hospital admission.
A Simple Blood Test That Offers Clues
One of the oldest bedside tricks for distinguishing upper from lower GI bleeding is the ratio of blood urea nitrogen to creatinine (BUN/Cr). When blood is digested in the upper GI tract, the protein in it gets broken down and absorbed, which raises BUN levels. Creatinine stays stable, so the ratio climbs. A high BUN/Cr ratio nudges the diagnosis toward an upper source. A recent meta-analysis pooling 17 studies found that the average BUN/Cr was meaningfully higher in patients with upper GI bleeding compared with lower GI bleeding. At a cutoff of 30, the test was quite specific (about 89%) but not very sensitive (about 39%), meaning a high ratio strongly suggests upper bleeding but a normal ratio does not rule it out.12PubMed. Blood Urea Nitrogen-to-Creatinine Ratio to Differentiate Upper From Lower Gastrointestinal Bleeding: A Systematic Review and Meta-Analysis
The test is not perfect, and its accuracy can vary by population. A study in children with melena found that while a BUN/Cr ratio of 30 or above was associated with upper GI bleeding (with about sevenfold increased odds), the overall discriminating ability was not strong enough to rely on alone, especially for distinguishing between different upper GI causes like ulcers versus varices.13PubMed Central. Availability of blood urea nitrogen/creatinine ratio in gastrointestinal bleeding with melena in children Another emergency department study found an area under the curve of only 0.63 at a cutoff of 35, reinforcing that the ratio is a useful adjunct but not a standalone diagnostic tool.14PubMed Central. Blood Urea Nitrogen to Creatinine ratio in Differentiation of Upper and Lower Gastrointestinal Bleedings; a Diagnostic Accuracy Study Think of it as one more data point that, combined with the clinical picture and stool appearance, helps steer the evaluation.
Endoscopy Timing
Upper endoscopy is the cornerstone of both diagnosis and treatment for melena caused by upper GI bleeding. The scope allows a gastroenterologist to see the bleeding site directly and, in many cases, stop the bleeding during the same procedure using clips, cautery, or injection therapy. But one question that has generated a surprising amount of debate is how urgently the scope needs to go in.
Intuitively, you might assume that faster is always better. The evidence is more nuanced. A large randomized trial published in the New England Journal of Medicine compared urgent endoscopy (within 6 hours) to early endoscopy (within 6 to 24 hours) in patients with acute upper GI bleeding. The urgent group was more likely to have actively bleeding ulcers found at the time of the procedure (about 66% versus 48%), and more of them received hemostatic treatment during the initial exam.15PubMed. Timing of Endoscopy for Acute Upper Gastrointestinal Bleeding But that did not translate into better clinical outcomes for the patients overall. A separate analysis similarly found that very early endoscopy led to more endoscopic therapy being performed (about 64% versus 29%) yet showed no relationship between timing and outcomes like mortality or need for surgery.16Clinical Endoscopy. Endoscopy Timing in Patients with Acute Upper Gastrointestinal Bleeding
An earlier study comparing endoscopy within 6 hours to endoscopy between 6 and 24 hours reached the same conclusion: no significant differences in mortality, surgical need, or transfusion requirements. Even when the analysis was limited to patients who received endoscopic hemostasis, earlier timing did not improve results. Multivariate analysis found no advantage for endoscopy before 6 hours compared with endoscopy performed within 24 hours.17PubMed Central. Time to endoscopy and outcomes in upper gastrointestinal bleeding The takeaway is that endoscopy within 24 hours is standard, and pushing it earlier appears to mainly increase the number of procedures performed without clearly saving lives. Exceptions exist for patients who are hemodynamically unstable or showing signs of ongoing massive bleeding, where earlier intervention makes clinical sense.
Acid Suppression After the Scope
Once a bleeding ulcer has been treated endoscopically, the next step is to suppress stomach acid so the ulcer can heal and the clot over the bleeding vessel stays in place. Proton pump inhibitors (PPIs) like omeprazole or pantoprazole are the standard. For years, the conventional approach after treating a high-risk ulcer was to run a continuous intravenous PPI drip for 72 hours, based on the logic that keeping the stomach’s pH consistently high would protect the clot better than intermittent dosing.
A systematic review and meta-analysis challenged this thinking. Comparing intermittent PPI dosing (bolus injections given every 8 to 12 hours, or even oral doses) to continuous IV infusion, the intermittent approach was at least as good. The rebleeding rate within 7 days was actually slightly lower with intermittent therapy, and none of the summary estimates for mortality, rebleeding at 30 days, blood transfusion needs, or hospital length of stay favored continuous infusion.18PubMed Central. Intermittent vs Continuous Proton Pump Inhibitor Therapy for High-Risk Bleeding Ulcers: A Systematic Review and Meta-analysis A separate trial comparing high-dose PPI infusion with lower-dose PPI therapy after endoscopic hemostasis reached a consistent conclusion: the infusion was not superior for rebleeding, need for surgery, or mortality.19PubMed. Comparison of infusion or low-dose proton pump inhibitor treatments in upper gastrointestinal system bleeding This matters practically because continuous infusion ties a patient to an IV pump and often to an intensive care bed, whereas intermittent dosing is simpler and cheaper.
Melena in Children
Although GI bleeding is far less common in children than in adults, melena does occur in pediatric patients, and the causes overlap partially but not entirely with the adult list. A study examining children who presented with melena found that the upper GI tract was the source in the vast majority of cases. Duodenal ulcers were the most common diagnosis, followed by gastric ulcers, esophagitis, and esophageal varices. In a smaller number of patients, the bleeding source was the small intestine.20PubMed Central. Causes of Melena and Effective Examination Strategies in Children Meckel’s diverticulum, a congenital outpouching of the small bowel, is a classic pediatric cause of GI bleeding that can sometimes produce melena, especially in younger children.
The same study found that vomiting, abnormal abdominal ultrasound findings, and a hemoglobin level more than 3 g/dL below the lower limit of normal were significant predictors that the bleeding source would be identifiable on standard upper endoscopy.21PubMed Central. Causes of Melena and Effective Examination Strategies in Children For pediatric gastroenterologists, this kind of clinical triaging helps decide which children need urgent scoping and which can be observed more conservatively.
Rare Vascular and Clotting-Related Causes
Most melena traces back to common conditions like ulcers and varices, but occasionally the underlying driver is something far less expected. Inherited clotting disorders can set the stage for portal vein thrombosis, which in turn raises portal pressure and produces esophageal varices capable of bleeding. A reported case described a patient with protein S deficiency who developed portal vein thrombosis, subsequent portal hypertension, and ultimately esophageal variceal bleeding causing upper GI hemorrhage.22PubMed Central. Esophageal variceal bleeding: portal hypertension and portal vein thrombosis secondary to protein S deficiency – a case report Cases like this are uncommon, but they illustrate why clinicians investigate further when a young person develops varices without obvious liver disease. A clotting abnormality may be hiding upstream.
Aortoenteric fistulas deserve a mention because, while rare, they are among the most dangerous causes of melena. These abnormal connections between the aorta and the small bowel occur most often in patients who have had previous aortic graft surgery. A “herald bleed,” a small initial episode of melena or bloody stool, sometimes precedes a catastrophic hemorrhage. Any patient with a history of aortic repair who develops melena is treated as a surgical emergency until proven otherwise.
What You Should Do If You Notice Black Stool
If your stool looks black and tarry and you have not recently taken iron supplements, bismuth medications, or eaten large quantities of foods known to darken stool, contact a healthcare provider promptly. The urgency scales with your other symptoms. Lightheadedness, weakness, a racing heart, or vomiting blood alongside black stool all suggest active, significant bleeding and warrant an emergency room visit. Even without those symptoms, new-onset melena should be evaluated fairly quickly because the underlying bleeding can be intermittent and unpredictable.
While waiting to be seen, avoid NSAIDs and alcohol, both of which can worsen GI bleeding. If you take blood thinners or antiplatelet medications, do not stop them on your own, but make sure the treating clinician knows what you are taking so the medication can be managed appropriately. Bringing a photo of the stool, as unappealing as that sounds, can be genuinely helpful for the clinical team. As the color-card study showed, a visual reference often communicates more reliably than verbal descriptions.

