What to Do for Ulcers: Causes, Treatment & Relief

Most peptic ulcers heal within weeks once the underlying cause is addressed, and for the vast majority of people that means treating a bacterial infection, stopping a damaging medication, or both. The two drivers behind nearly nine out of ten ulcers are a stomach bacterium called Helicobacter pylori and regular use of nonsteroidal anti-inflammatory drugs (NSAIDs) like ibuprofen or aspirin. Figuring out which one is responsible, and sometimes it is both, determines the course of treatment and how to prevent a recurrence.

Why Ulcers Form in the First Place

Your stomach lining has a sophisticated defense system. A thick layer of mucus, a steady supply of bicarbonate, and healthy blood flow all work together to keep your own digestive acid from eating through the tissue. Prostaglandins, hormone-like chemicals produced locally, coordinate much of that protection. When something disrupts this balance, acid gains the upper hand, and an open sore develops in the stomach lining (gastric ulcer) or the first stretch of the small intestine (duodenal ulcer).

H. pylori disrupts the balance by burrowing into the mucus layer, triggering chronic inflammation that weakens the lining from within. NSAIDs disrupt it differently: they block prostaglandin production, stripping the mucosa of the chemical signals it relies on for self-repair.1PubMed. Prostaglandins, NSAIDs, and gastric mucosal protection: why doesn’t the stomach digest itself? That is why even a few weeks of daily ibuprofen can be enough to cause trouble, especially in someone who already carries H. pylori. In one large study of patients presenting with upper gastrointestinal bleeding, roughly two-thirds of ulcers were linked to H. pylori, about a tenth to NSAIDs alone, and another tenth or so to both factors together.2PubMed Central. Non-Helicobacter pylori, non-NSAIDs peptic ulcers: a descriptive study on patients referred to Taleghani hospital with upper gastrointestinal bleeding That still left about 13% of ulcers with neither cause, a reminder that rarer mechanisms exist.

Getting the Right Diagnosis

Ulcer symptoms overlap heavily with other stomach problems. Burning or gnawing pain in the upper abdomen, nausea, bloating, and feeling uncomfortably full after small meals are common, but functional dyspepsia (a condition with no visible damage) can produce all the same complaints. In fact, research comparing the two groups found that patients with functional dyspepsia often reported more severe distress and higher anxiety levels than those who actually had an ulcer.3PubMed. Comparison of clinical features and patient background in functional dyspepsia and peptic ulcer You cannot tell the difference by symptoms alone, which is why doctors typically order an endoscopy, a thin camera threaded down the throat, to look directly at the lining and take tissue samples if needed.

Once an ulcer is confirmed, the next step is testing for H. pylori. Several options exist, and they are not all equally reliable. Stool antigen tests and the urea breath test consistently perform well, with sensitivity in the range of roughly 90–96% and strong overall accuracy.4PubMed Central. Diagnostic values of Helicobacter pylori diagnostic tests: stool antigen test, urea breath test, rapid urease test, serology and histology Blood-based serology tests, on the other hand, score much lower, sometimes barely above coin-flip accuracy.5PubMed Central. Accuracy of H. pylori fecal antigen test using fecal immunochemical test (FIT) Serology detects antibodies that can linger long after the infection is gone, so a positive result does not necessarily mean you are still infected. If your doctor orders a blood test alone, it is worth asking about a breath or stool test for confirmation, especially if treatment decisions hinge on the result.6PubMed. Prospective evaluation of a new stool antigen test for the detection of Helicobacter pylori, in comparison with histology, rapid urease test, (13)C-urea breath test, and serology

How Ulcers Are Treated

Treatment splits into two tracks depending on whether H. pylori is present.

Acid Suppression

Regardless of the cause, reducing acid production gives the ulcer time to heal. Proton pump inhibitors (PPIs) like omeprazole, lansoprazole, and pantoprazole are the standard first choice. They shut down acid pumps in the stomach lining and are markedly more effective than the older class of drugs known as H2 blockers (ranitidine, famotidine). In a comparative study, PPIs achieved ulcer healing in about 90% of patients at six weeks, compared with roughly 72% for H2 blockers, and the three-month recurrence rate was far lower with PPIs as well.7Innovative Research in Applied, Biological and Chemical Sciences. Comparative Study of Proton Pump Inhibitors versus H2 Blockers in Peptic Ulcer Disease Management H2 blockers still have a role for people who cannot tolerate PPIs or who need a milder option for maintenance, but for active ulcer healing, PPIs are the go-to.

Killing the Bacteria

If H. pylori is found, acid suppression alone is not enough. The infection will keep damaging the lining unless it is eradicated, so antibiotics are added. The classic approach is “triple therapy”: a PPI plus two antibiotics, traditionally clarithromycin and amoxicillin, taken for ten to fourteen days. The catch is that antibiotic resistance has eroded this regimen’s effectiveness over the past decade. Clarithromycin resistance in particular has climbed sharply in many regions.8PubMed Central. Optimizing clarithromycin-containing therapy for Helicobacter pylori in the era of antibiotic resistance When resistance is high, doctors often turn to bismuth quadruple therapy, which adds a bismuth compound and substitutes different antibiotics. Bismuth-based regimens hold up better against resistant strains because the drugs in them work through mechanisms that bacteria have a harder time dodging.

For NSAID-caused ulcers in someone who does not carry H. pylori, stopping the offending drug and taking a PPI for four to eight weeks is usually sufficient. If you cannot stop the NSAID (some people take low-dose aspirin for heart protection, for example), a PPI taken alongside the NSAID can both heal an existing ulcer and reduce the risk of a new one forming.9PubMed Central. Non-steroidal anti-inflammatory drugs and the gastrointestinal tract

Drug Combinations That Raise Your Risk

NSAIDs on their own are risky enough for the stomach, but certain medication pairings amplify the danger considerably. Taking a conventional NSAID alongside a corticosteroid (like prednisone) produced the highest excess risk of upper gastrointestinal bleeding in a large study of drug interactions.10PubMed. Risk of upper gastrointestinal bleeding from different drug combinations Pairing NSAIDs with anticoagulants (blood thinners) or with SSRIs (a common class of antidepressants) also raised the risk above what either drug caused alone. Even low-dose aspirin combined with an anticoagulant carried meaningful excess risk.

If you take any of these combinations regularly, a protective PPI is often worth discussing with your doctor. COX-2 selective NSAIDs (like celecoxib) are somewhat gentler on the stomach than traditional NSAIDs, though they carry their own cardiovascular considerations that need to be weighed.11PubMed Central. Nonsteroidal Anti-Inflammatory Drug-Induced Peptic Ulcer Disease

Alcohol, Smoking, and Other Lifestyle Factors

Alcohol and cigarette smoking have both been shown to damage the stomach’s protective barrier. Alcohol disrupts the mucosal lining and alters its structure, while smoking specifically impairs blood flow and cell turnover in the stomach wall, slowing down healing once an ulcer has formed.12PubMed. Alcohol drinking and cigarette smoking: a “partner” for gastric ulceration Neither habit is considered a primary cause of ulcers the way H. pylori and NSAIDs are, but both make ulcers more likely to develop and harder to resolve. If you are being treated for an ulcer and continue smoking, the healing process can drag on even with the right medications.

The Milk and Spicy Food Myth

One of the most persistent pieces of folk medicine is that drinking milk soothes an ulcer. It feels true in the moment: milk coats the stomach and briefly dulls the burning. But research tells a different story. Milk stimulates the secretion of gastric acid, which means that brief relief is followed by a rebound that can actually worsen the ulcer.13Environmental Disease. Pathophysiological status and nutritional therapy of peptic ulcer: An update Studies have also suggested that milk has an adverse effect on duodenal ulcer healing rates. The old advice to sip milk for stomach pain may have felt intuitive, but it is counterproductive.

Spicy food occupies a similar mythological space. Strong spices like chili peppers and black pepper do not appear to cause ulcers, and no convincing evidence links any specific diet to ulcer formation. However, these spices can aggravate the pain of an existing ulcer by irritating already-damaged tissue. So while you do not need a bland diet to prevent ulcers, you may want to ease up on the hot sauce while you are healing one.

Can Probiotics Help

Probiotics have attracted interest as a supplement to standard H. pylori treatment rather than a replacement for it. The logic is straightforward: antibiotics wipe out gut bacteria indiscriminately, causing side effects like diarrhea, bloating, and nausea that sometimes lead patients to stop treatment early. Probiotics could theoretically cushion the blow while also making the antibiotics more effective.

The evidence is encouraging, though not overwhelming. A large meta-analysis found that adding probiotics to standard therapy improved eradication rates by about 12% and cut the risk of side effects roughly in half compared with antibiotics alone.14PLoS ONE. The Effect of Probiotics Supplementation on Helicobacter pylori Eradication Rates and Side Effects during Eradication Therapy: A Meta-Analysis An umbrella review of multiple meta-analyses came to a similar conclusion, with probiotics associated with improved eradication and reduced side effects across pooled strains.15PubMed Central. Using Probiotics as Supplementation for Helicobacter pylori Antibiotic Therapy The caveat is that results were strongest in non-blinded trials, so some of the benefit may be inflated by placebo effects. Still, the side-effect reduction alone makes probiotics a reasonable add-on, especially for someone who previously failed treatment because of intolerance to the antibiotics.

When an Ulcer Becomes an Emergency

Most ulcers are uncomfortable but manageable. A small percentage, however, develop life-threatening complications. The two major emergencies are perforation, where the ulcer eats entirely through the stomach or intestinal wall, and severe bleeding.

A perforated ulcer typically announces itself with sudden, severe abdominal pain, a rigid abdomen, and a rapid heart rate. This is the classic triad, and it calls for immediate medical attention.16PubMed Central. Perforated peptic ulcer – an update Perforation leads to peritonitis (infection of the abdominal cavity) and can progress to septic shock if not treated urgently. Surgery, usually laparoscopic repair with an omental patch, remains the standard approach, and speed matters: delayed treatment worsens outcomes significantly.17PubMed Central. Perforated and bleeding peptic ulcer: WSES guidelines

Bleeding ulcers can be subtler in onset. You might notice black, tarry stools, vomit that looks like coffee grounds, or sudden lightheadedness. These are signs that the ulcer has eroded into a blood vessel. Endoscopy can both diagnose and treat bleeding in many cases, using clips, cautery, or injection therapy to seal the vessel. But if bleeding is massive, emergency surgery may be required.

Ulcers at the Extremes of Age

Peptic ulcers in children are uncommon but do occur, and they tend to look different from adult ulcers. In younger children, ulcers are more often “secondary,” meaning they arise from physiological stress, serious illness, burns, or medications rather than from H. pylori. These secondary ulcers tend to carry a worse prognosis.18Paediatrics and Child Health. Peptic ulcer disease in children In teenagers, H. pylori infection becomes more common and starts to resemble the adult pattern.

At the other end of the spectrum, older adults face a uniquely dangerous combination. Ulcer rates in the general population have been declining thanks to better H. pylori treatment, but hospitalizations and deaths from ulcer complications remain stubbornly high in the elderly.19PubMed. Optimal management of peptic ulcer disease in the elderly The reasons are not mysterious: older adults are far more likely to be on daily aspirin or NSAIDs for arthritis and heart disease, and their stomach lining is already thinner with age. In patients over 80, one study found ulcers in 17% of those who underwent endoscopy, and complications occurred in nearly 70% of those cases. Intriguingly, the majority of ulcers in that age group were H. pylori negative, pointing to NSAID use as the dominant culprit.20PubMed. Peptic ulcer in the very old patients For older adults on chronic NSAID or aspirin therapy, a co-prescribed PPI is strongly recommended as a preventive measure.

Preventing Recurrence

Healing an ulcer is only half the job. Ulcers come back unless the root cause is dealt with. If H. pylori was responsible, successful eradication dramatically lowers the chance of recurrence, which is why doctors typically confirm the bacteria are gone with a follow-up breath or stool test about four weeks after finishing antibiotics. If the first round of treatment fails, a second attempt with a different antibiotic combination is usually tried.

For NSAID-related ulcers, prevention revolves around minimizing exposure. If you need long-term anti-inflammatory therapy, your doctor may recommend switching to a COX-2 selective inhibitor or pairing your NSAID with a daily PPI.9PubMed Central. Non-steroidal anti-inflammatory drugs and the gastrointestinal tract Newer acid-suppressing drugs like vonoprazan, a potassium-competitive acid blocker, have shown non-inferiority to traditional PPIs for preventing ulcer recurrence during long-term NSAID use, offering another option for people who do not respond well to standard PPIs.21Gut. Vonoprazan prevents ulcer recurrence during long-term NSAID therapy: randomised, lansoprazole-controlled non-inferiority and single-blind extension study

For certain NSAID users who cannot tolerate PPIs, misoprostol, a synthetic prostaglandin, is an older alternative. It works by replacing the prostaglandins that NSAIDs suppress and has shown particular effectiveness for preventing gastric ulcers specifically, outperforming H2 blockers in that role. Its main downside is gastrointestinal side effects, especially diarrhea and cramping, which limit tolerability for some patients.

Rare Causes Worth Knowing About

If an ulcer keeps coming back despite proper treatment, or if ulcers appear in unusual locations (deep in the small intestine rather than the typical stomach and duodenum), doctors start looking for less common explanations. Zollinger-Ellison syndrome is one such condition. It is caused by a gastrin-secreting tumor, called a gastrinoma, that drives the stomach to produce extreme amounts of acid. The result is recurrent ulcers, severe reflux, and chronic diarrhea.22PubMed Central. Gastrinoma and Zollinger Ellison syndrome: A roadmap for the management between new and old therapies Doctors should suspect it in patients with ulcers that refuse to heal on standard therapy, ulcers in unusual locations, or a family history of multiple endocrine tumors.23PubMed. Zollinger-Ellison Syndrome Treatment typically involves high-dose PPIs to control acid and, when feasible, surgical removal of the gastrinoma itself.

Other uncommon causes include Crohn’s disease affecting the upper GI tract, certain infections in people with weakened immune systems, and, in rare cases, stomach cancer masquerading as a benign ulcer. This is one reason endoscopy with biopsy is the preferred diagnostic tool: it lets the doctor rule out malignancy directly. If you have an ulcer that does not respond to a full course of treatment, a repeat endoscopy with fresh biopsies is standard practice.

How the Understanding of Ulcers Changed

Until the early 1980s, ulcers were blamed almost entirely on stress and diet. The prevailing medical wisdom held that anxious, high-strung people who ate poorly were the ones who got ulcers, and treatment revolved around antacids, bland diets, and sometimes surgery to cut the nerves controlling acid secretion. That changed in 1982 when Robin Warren and Barry Marshall cultured spiral-shaped bacteria from human stomach tissue and proposed that this organism, later named Helicobacter pylori, was the real cause of most peptic ulcers.24PubMed Central. Helicobacter pylori–a Nobel pursuit? The idea was initially met with skepticism. Marshall famously drank a broth of H. pylori to prove it caused gastritis. The pair won the Nobel Prize in Physiology or Medicine in 2005.

The stress-and-diet narrative has not been entirely wrong, just dramatically overstated. Psychological stress does not directly bore a hole in your stomach lining, but there is evidence that it can worsen the course of illness in critically ill patients through the release of stress-related neuropeptides, though the data remain thin and are mostly studied in intensive-care settings rather than everyday life.25PubMed. Potential effects of stress in critical illness through the role of stress neuropeptides For the average person worrying about a stressful job causing an ulcer, the honest answer is that stress alone is very unlikely to be the culprit. Getting tested for H. pylori and reviewing your painkiller habits will be far more productive than trying to meditate your way to a healed stomach.