A peptic ulcer is an open sore that develops on the inner lining of your stomach or the upper part of your small intestine (the duodenum). These sores form when the protective mucus layer that shields your digestive tract breaks down, allowing stomach acid to eat into the tissue beneath. Globally, peptic ulcers affect roughly 99 out of every 100,000 people, making them one of the most common gastrointestinal conditions.
Gastric vs. Duodenal Ulcers
Peptic ulcers fall into two main types based on location. Gastric ulcers form in the stomach itself. Duodenal ulcers form in the first section of the small intestine, just past the stomach. The distinction matters because the two types produce noticeably different patterns of pain. Gastric ulcers tend to hurt more during and after meals, when food stimulates acid production in the stomach. Duodenal ulcers do the opposite: pain flares on an empty stomach and often improves after eating, because food moves acid out of the duodenum.
In both cases, the underlying problem is the same. Something has disrupted the balance between the acid your stomach produces and the protective barrier that keeps that acid from damaging tissue.
What Causes Peptic Ulcers
Two culprits account for the vast majority of peptic ulcers: a bacterial infection and long-term use of common pain relievers.
H. pylori Infection
Helicobacter pylori is a spiral-shaped bacterium that can survive in the harsh acid environment of your stomach. It does this by producing an enzyme called urease, which neutralizes the acid immediately surrounding the bacterium, creating a small pocket of safety. Once established, H. pylori begins weakening the stomach’s defenses in several ways. It breaks down the tight junctions between cells in the stomach lining, essentially poking holes in the barrier. It also releases proteins that trigger inflammation in the surrounding tissue, and it interferes with the normal signaling pathways your cells use to repair damage.
Over time, the bacterium’s outer coating actively slows wound healing by reducing cell growth and disrupting the repair cycle. This combination of persistent inflammation and impaired healing is what turns a minor irritation into a lasting ulcer. H. pylori infection also raises the long-term risk of stomach cancer, which is one reason treatment is important even when symptoms are mild.
Pain Relievers (NSAIDs)
Nonsteroidal anti-inflammatory drugs, the category that includes ibuprofen, aspirin, and naproxen, are the second leading cause. These medications work by blocking the production of chemicals called prostaglandins, which are responsible for pain and inflammation. The problem is that the same prostaglandins also play a protective role in your stomach. They stimulate mucus production, maintain blood flow to the stomach lining, and help surface cells regenerate. When NSAID use suppresses these protective functions, the stomach lining becomes vulnerable to its own acid. NSAIDs also have a direct irritant effect on the stomach lining’s surface, compounding the damage.
The risk increases significantly with higher doses, longer use, and in people over 65. Taking NSAIDs on an empty stomach makes topical irritation worse, but the systemic prostaglandin suppression happens regardless of whether you take them with food.
Rare Causes
In a small number of cases, peptic ulcers develop without H. pylori or NSAID use. One uncommon condition called Zollinger-Ellison syndrome involves tumors (gastrinomas) that form in the pancreas or duodenum and release massive amounts of the hormone gastrin. Gastrin tells your stomach to produce acid, and when levels are abnormally high, the resulting acid overload overwhelms the stomach’s defenses. Doctors consider this diagnosis when ulcers are severe, keep coming back despite treatment, or appear in someone with no history of H. pylori infection or NSAID use.
What Peptic Ulcers Feel Like
The most common symptom is a burning or gnawing pain in the upper abdomen, between the navel and the breastbone. Many people describe it as a hunger-like ache. The pain often comes and goes over days or weeks, and it can wake you up at night, particularly with duodenal ulcers, when your stomach is empty and acid has nothing to digest but tissue.
Other common symptoms include bloating, nausea, feeling full quickly after eating, and a general loss of appetite. Some people with gastric ulcers begin avoiding food because eating triggers discomfort, which can lead to unintentional weight loss. Mild ulcers can also be entirely silent, producing no noticeable symptoms at all until a complication develops.
When Ulcers Become Dangerous
Most peptic ulcers heal with proper treatment, but untreated ulcers can lead to serious complications. The two most concerning are bleeding and perforation.
A bleeding ulcer occurs when the sore erodes into a blood vessel. Signs include vomiting blood (which may look like coffee grounds) or passing dark, tarry stools. Slow bleeding over time can also cause anemia, leaving you fatigued and short of breath without an obvious source of blood loss.
Perforation is when the ulcer burns entirely through the wall of the stomach or duodenum, creating a hole. This is a medical emergency. The hallmark is sudden, severe abdominal pain with a rigid abdomen that’s extremely tender to touch. Symptoms of shock, including fainting, heavy sweating, and confusion, can follow quickly. Perforation requires immediate medical attention, and surgery may be necessary to repair the hole.
How Peptic Ulcers Are Diagnosed
Diagnosis typically starts with testing for H. pylori, since the presence of the bacterium largely determines the treatment approach. The urea breath test is a simple, noninvasive option: you swallow a small capsule or drink containing a tagged form of urea, then breathe into a collection bag. If H. pylori is present, its urease enzyme breaks down the urea and produces a detectable byproduct in your breath. Studies have shown the breath test to be highly accurate, matching the results of endoscopy with biopsy in identifying the infection. Stool antigen tests offer a similarly reliable alternative.
An upper endoscopy (where a thin, flexible camera is passed through your mouth into your stomach) gives doctors a direct view of the ulcer. This is typically recommended when symptoms are severe, when there’s concern about bleeding, or in people over 55 where the risk of stomach cancer warrants a closer look. During the procedure, small tissue samples can be taken to test for H. pylori or rule out other conditions.
Treatment and Healing Time
Treatment depends on the cause. If H. pylori is found, the goal is to eliminate the infection and reduce acid levels so the ulcer can heal.
The standard approach combines an acid-reducing medication with antibiotics, taken together for one to two weeks. The most common regimen uses three medications (a proton pump inhibitor plus two antibiotics), though this approach now cures roughly 76% of infections. Because antibiotic resistance has reduced the effectiveness of three-drug therapy, many doctors have shifted to four-drug regimens, which achieve cure rates above 90% when taken for 14 days.
For ulcers caused by NSAIDs, the first step is stopping the drug or switching to an alternative. Acid-reducing medication alone is usually enough to allow healing once the irritant is removed. Most uncomplicated ulcers heal within four to eight weeks with appropriate treatment.
After completing treatment for H. pylori, your doctor will typically recheck for the bacterium using a breath test or stool test to confirm the infection is gone. Incomplete eradication is the most common reason ulcers recur.
Diet, Stress, and Common Misconceptions
For decades, spicy food and stress were blamed for causing ulcers. Research has not supported either claim. The National Institute of Diabetes and Digestive and Kidney Diseases states that diet and nutrition do not play an important role in causing, preventing, or treating peptic ulcers, and doctors do not recommend following a special diet or avoiding specific foods to manage them.
That said, certain foods and habits can worsen symptoms even though they don’t cause the ulcer itself. Alcohol, coffee, and acidic foods may increase discomfort by stimulating acid production or irritating already-damaged tissue. Smoking also slows ulcer healing and increases the risk of recurrence. These are worth managing for comfort, but eliminating spicy food won’t prevent an ulcer from forming in someone with an H. pylori infection or regular NSAID use.

