What Is a Stomach Ulcer? Causes, Symptoms & Treatment

A stomach ulcer is an open sore that forms on the inner lining of your stomach. It develops when the protective mucus layer that shields your stomach wall breaks down, allowing digestive acid to eat into the tissue underneath. Stomach ulcers are part of a broader category called peptic ulcers, which also includes ulcers in the upper part of the small intestine (duodenal ulcers). Together, peptic ulcers affect roughly 10 to 15% of the global population, though rates have dropped significantly over the past three decades.

How a Stomach Ulcer Forms

Your stomach produces strong acid to break down food, but it also maintains a sophisticated defense system to protect itself from that same acid. The inner surface is coated with a gel-like mucus layer that acts as a barrier, keeping acid and digestive enzymes away from the delicate tissue beneath. Cells in the lining also secrete bicarbonate (a natural acid neutralizer), and a steady blood supply helps repair minor damage as it happens.

An ulcer forms when something tips the balance between these defenses and the acid’s corrosive power. When the mucus barrier is weakened or acid production ramps up beyond what the defenses can handle, hydrogen ions from stomach acid penetrate the lining and damage the cells underneath. Over time, this creates a raw, crater-like wound. If the erosion goes deep enough, it can reach blood vessels or even perforate the stomach wall entirely.

The Two Main Causes

The vast majority of stomach ulcers trace back to one of two culprits: a bacterial infection or regular use of common pain relievers.

H. pylori infection. A spiral-shaped bacterium called Helicobacter pylori burrows into the mucus layer and triggers chronic inflammation. This weakens the protective barrier and makes the tissue vulnerable to acid damage. Many people carry H. pylori without ever developing an ulcer, but the infection dramatically raises the risk. Globally, duodenal ulcers are far more common than gastric ulcers, accounting for roughly 19 out of every 20 peptic ulcer cases.

Pain relievers (NSAIDs). Ibuprofen, aspirin, and naproxen belong to a class of drugs that reduce inflammation throughout the body, but they also suppress production of the compounds your stomach relies on to maintain its mucus lining. Taking these medications regularly, especially at higher doses or over long periods, can gradually erode that protective layer.

What a Stomach Ulcer Feels Like

The most common symptom is a burning or gnawing pain in the upper abdomen, between the navel and the breastbone. The timing of the pain can actually hint at where the ulcer is located. With a stomach (gastric) ulcer, eating may either relieve or worsen the pain. With a duodenal ulcer, eating typically brings relief, but the pain returns two to three hours later as the stomach empties. Many people with duodenal ulcers notice the pain most at night.

Other common symptoms include bloating, feeling full quickly after small meals, nausea, and a general loss of appetite. Some people experience heartburn or frequent burping. It’s also possible to have an ulcer with no noticeable symptoms at all, which is one reason complications sometimes seem to come out of nowhere.

Serious Warning Signs

Most ulcers are manageable, but complications can be dangerous. Globally, an estimated 15,000 people die from peptic ulcer disease each year. The two biggest emergencies are bleeding and perforation.

A bleeding ulcer can show up as vomit that looks red or resembles dark coffee grounds. Your stools may turn black and tarry, which signals digested blood passing through the intestines. Slower, hidden bleeding may not produce visible changes but can cause lightheadedness, fatigue, difficulty breathing, or fainting over time as you become anemic.

A perforated ulcer, where the sore erodes completely through the stomach wall, causes sudden, severe abdominal pain and is a medical emergency. Signs of significant blood loss or shock include rapid pulse, clammy or pale skin, dizziness, confusion, and drop in blood pressure. Any of these symptoms warrants immediate emergency care.

How Stomach Ulcers Are Diagnosed

The most definitive way to diagnose a stomach ulcer is with an upper GI endoscopy. A doctor passes a thin, flexible tube with a camera down your throat to visually inspect the lining of your esophagus, stomach, and the first part of the small intestine. During the procedure, they can take small tissue samples (biopsies) to check for H. pylori and rule out other conditions, including cancer.

If the goal is simply to check for H. pylori, there are noninvasive options. A urea breath test involves swallowing a small capsule or liquid containing a specially labeled form of urea. If H. pylori is present, the bacteria convert the urea into carbon dioxide, which is detected when you breathe into a collection container a few minutes later. A stool test can also identify the infection by detecting bacterial proteins in a stool sample.

Treatment and Healing Timeline

Treatment depends on the cause. For ulcers caused by H. pylori, the standard approach combines an acid-reducing medication with antibiotics to clear the infection. The current preferred regimen for patients who haven’t been treated before is a 14-day course of four medications: an acid blocker plus three antimicrobial agents. This combination successfully heals more than 90% of H. pylori-related ulcers.

For ulcers caused by NSAID use, the primary treatment is an acid-suppressing medication (a proton pump inhibitor, or PPI) that allows the lining to heal while acid production stays low. You’ll also need to stop taking the NSAID that caused the problem, or switch to an alternative. Duodenal ulcers tied to NSAID use typically heal within four weeks of PPI treatment. Stomach ulcers generally take longer: eight weeks of treatment produces better results than four weeks for gastric ulcers specifically.

During recovery, you’ll likely notice pain improving within the first few days to a week of starting treatment, but full healing of the tissue takes the entire course. Stopping medication early because you feel better is one of the most common reasons ulcers come back.

Lifestyle Factors That Matter

Smoking increases the risk of developing ulcers and slows healing. If you’re being treated for a stomach ulcer, quitting smoking is one of the most impactful things you can do to support recovery.

Alcohol’s role is a bit more nuanced. The evidence that alcohol directly causes ulcers is considered weak. However, alcohol can worsen the symptoms of an existing ulcer and may contribute to recurrence in people who’ve already been treated. Most doctors recommend avoiding alcohol during active treatment.

Stress has a similar profile. While everyday psychological stress isn’t a direct cause of ulcers (a common misconception from earlier decades), it can aggravate symptoms and may interfere with healing. Severe physiological stress, like the kind that follows major surgery, burns, or critical illness, is a separate category and can cause a distinct type of ulcer called a stress ulcer.

No specific diet has been shown to cause or cure ulcers, but paying attention to foods that trigger your symptoms is practical. Spicy foods, acidic foods, and caffeine bother some people with active ulcers and are fine for others. The key is individual response rather than a universal list of foods to avoid.

Why Ulcers Come Back

Recurrence is common when the underlying cause isn’t fully addressed. If H. pylori isn’t completely eradicated, the infection will continue to damage the stomach lining and an ulcer can return. Incomplete antibiotic courses and antibiotic resistance are the main reasons eradication fails. For persistent infections after a first treatment attempt, doctors use adjusted regimens, often for another 14 days with different medications.

For NSAID-related ulcers, recurrence is almost guaranteed if you resume the same medication without protection. People who need to stay on NSAIDs for chronic conditions like arthritis are often prescribed a daily PPI alongside the pain reliever to keep the stomach lining protected.