Melena is black, tarry stool caused by bleeding in the upper digestive tract. The dark color comes from blood that has been chemically altered as it travels through the stomach and intestines. It takes roughly 100 to 200 mL of blood in the upper GI tract to produce visible melena, and the black stools can persist for several days even after the bleeding has stopped.
Why the Stool Turns Black
When blood pools in the stomach, gastric acid converts the red hemoglobin in your blood into a brown-black compound called hematin. As this oxidized blood moves through the small intestine and colon, bacteria break it down further, giving the stool its characteristic tar-like appearance and distinctly foul smell. The longer blood sits in the digestive tract, the darker it becomes, which is why melena usually points to a bleeding source above or near the beginning of the small intestine. Bleeding from the right side of the colon or deeper in the small bowel can occasionally produce melena too, if the blood moves slowly enough to undergo the same chemical transformation.
Peptic Ulcers: The Most Common Cause
Ulcers in the stomach or duodenum (the first section of the small intestine) are the leading cause of upper GI bleeding. Data from a large U.S. endoscopy database of nearly 8,000 patients found that peptic ulcers accounted for about 21% of upper GI bleeding cases, while a smaller prospective study put the figure closer to 32%. The range depends on the population being studied, but ulcers consistently top the list.
These ulcers develop when the protective mucus lining of the stomach or duodenum breaks down, exposing tissue to digestive acid. The two biggest drivers are infection with the bacterium H. pylori and regular use of nonsteroidal anti-inflammatory drugs like ibuprofen, naproxen, or aspirin. When an ulcer erodes into a blood vessel, it can bleed steadily or intermittently, producing melena that may come and go over days.
Esophageal Varices and Liver Disease
Esophageal varices are swollen veins in the lower esophagus that form when blood pressure in the portal vein system rises too high, a condition called portal hypertension. This is most commonly caused by cirrhosis of the liver. Normally, the portal vein carries over 1,500 mL of blood per minute through the liver. When scarring blocks that flow, pressure builds and the body reroutes blood through smaller collateral veins, including those lining the esophagus and upper stomach. Over time, these thin-walled veins balloon outward.
When varices rupture, the bleeding can be massive and life-threatening. Variceal bleeding is the third most common cause of upper GI bleeding after duodenal and gastric ulcers, and it is the most common fatal complication of cirrhosis. The severity of liver disease directly correlates with the risk of variceal rupture.
Mallory-Weiss Tears
A Mallory-Weiss tear is a longitudinal rip in the lining of the esophagus where it meets the stomach. It happens when a sudden spike in abdominal pressure forces the junction apart, most often during forceful vomiting or retching. Chronic alcohol use is the single biggest risk factor, identified in 50% to 70% of cases.
Beyond heavy drinking, these tears can be triggered by severe coughing, straining during a bowel movement, seizures, and conditions that cause repeated vomiting: morning sickness, eating disorders like bulimia, chemotherapy, gastroenteritis, and diabetic ketoacidosis. The primary symptom is usually vomiting blood, but when bleeding is milder or more prolonged, it can present as melena instead.
Gastritis and Erosive Damage
Gastritis, or inflammation of the stomach lining, can cause bleeding when it becomes erosive, meaning the surface tissue actually wears away. This frequently happens with heavy alcohol use, prolonged NSAID use, or severe physical stress on the body (major surgery, burns, critical illness). The bleeding from erosive gastritis tends to be more diffuse, oozing from multiple spots rather than a single ulcer crater, but it can still produce enough blood loss to cause melena.
Certain medications can also directly damage the esophageal or stomach lining on contact. Pills that dissolve too slowly or get stuck in the esophagus, particularly some antibiotics, potassium supplements, and bisphosphonates for osteoporosis, can cause localized erosions that bleed.
Medications That Increase Bleeding Risk
NSAIDs deserve special attention because they work in two ways against you: they directly irritate the stomach lining and they reduce the blood’s ability to clot by suppressing platelet function. Even low-dose aspirin taken for heart protection significantly raises the risk of GI bleeding. Blood thinners like warfarin and the newer direct oral anticoagulants don’t cause ulcers themselves, but they make any existing source of bleeding much harder for the body to seal off. If you’re on a combination of an NSAID and an anticoagulant, the risk multiplies.
Less Common Causes
Upper GI cancers, including stomach cancer and esophageal cancer, can bleed as tumors outgrow their blood supply or invade nearby vessels. This type of bleeding is often slow and chronic, sometimes producing melena before any other symptoms appear. Vascular malformations, clusters of fragile abnormal blood vessels in the stomach or small bowel wall, are another source. These tend to cause intermittent bleeding and are more common in older adults and people with kidney disease.
A rare but dramatic cause is an aortoenteric fistula, an abnormal connection between the aorta and the small intestine. This most often occurs as a late complication of prior aortic surgery and can produce a small “herald bleed” of melena before a catastrophic hemorrhage.
Substances That Mimic Melena
Not every black stool is melena. Iron supplements are a common culprit for darkened stool, as is bismuth subsalicylate, the active ingredient in Pepto-Bismol and Kaopectate. Black licorice and blueberries in large amounts can also darken stool color. The key difference is texture and smell: true melena is sticky, tarry, and has a strong, distinctive odor that’s hard to miss. Stool darkened by iron or bismuth typically looks more normally formed and lacks that tar-like quality.
Signs That Bleeding Is Serious
Melena always warrants medical evaluation, but certain signs suggest significant blood loss is already underway. A resting heart rate that’s faster than normal can indicate you’ve lost up to 15% of your blood volume. Feeling lightheaded or dizzy when you stand up suggests around 15% volume loss. Low blood pressure while lying flat points to a loss of roughly 40%, which is a medical emergency. Accompanying symptoms like abdominal pain, vomiting blood or dark material that looks like coffee grounds, pale skin, and feeling faint all signal that the bleeding may be substantial or ongoing.
Because melena can continue appearing in your stool for days after bleeding has already stopped, the color of the stool alone doesn’t tell you whether you’re actively bleeding. Changes in heart rate, blood pressure, and how you feel when standing up are more reliable real-time indicators of whether blood loss is continuing.