How to Treat Peptic Ulcers: H. pylori, NSAIDs, and More

Peptic ulcer treatment targets two things: reducing stomach acid so the ulcer can heal, and eliminating whatever caused it in the first place. Most ulcers are caused by either a bacterial infection (H. pylori) or regular use of pain relievers like ibuprofen and aspirin. With the right treatment, over 90% of ulcers heal within 8 to 12 weeks.

Identify the Cause First

Treatment depends entirely on what’s driving the ulcer, so diagnosis comes before any real plan. The two most common causes are H. pylori infection and NSAID use (nonsteroidal anti-inflammatory drugs like ibuprofen, naproxen, and aspirin). Your doctor will typically test for H. pylori using a breath test, stool test, or biopsy during an endoscopy. If NSAIDs are the culprit, that history usually comes out in conversation. Less commonly, ulcers stem from a rare condition called Zollinger-Ellison syndrome, which causes the stomach to overproduce acid.

Getting this right matters because treating an H. pylori ulcer without antibiotics, or continuing NSAIDs while trying to heal, will likely fail.

Treating H. pylori Ulcers

If H. pylori is present, the goal is to wipe out the infection completely. The American College of Gastroenterology now recommends a 14-day course of four medications taken together: a proton pump inhibitor (PPI) to suppress acid, plus tetracycline, metronidazole, and a bismuth compound (the active ingredient in Pepto-Bismol). This combination is called bismuth quadruple therapy.

This represents a shift from older practice. For years, the most commonly prescribed regimen was a simpler three-drug combination using clarithromycin. That approach is now specifically recommended against unless lab testing has confirmed the bacteria are sensitive to clarithromycin. The reason: resistant strains have become so common that the old regimen eradicates H. pylori only about 30% of the time in resistant cases.

The 14-day regimen is demanding. You’re taking multiple pills several times a day, and side effects like nausea, metallic taste, and darkened stools are common. Finishing the full course matters enormously, though. Incomplete treatment breeds antibiotic resistance and makes future eradication harder. After treatment, follow-up testing is recommended at least four weeks after finishing antibiotics. If you’re also on a PPI or acid-reducing medication, you may need to stop it up to two weeks before the follow-up test, since these drugs can produce falsely negative results.

Treating NSAID-Related Ulcers

The single most important step is stopping the NSAID if at all possible. Once the irritant is removed, a PPI taken daily for 4 to 8 weeks allows most ulcers to heal. If you can’t stop the NSAID because you need it for a heart condition or chronic pain, co-therapy with a PPI is recommended to protect the stomach lining while healing continues.

One underappreciated issue: many people don’t realize they’re still taking NSAIDs. Cold and flu remedies, headache powders, and combination pain relievers frequently contain ibuprofen or aspirin. If an ulcer isn’t healing, it’s worth reading the labels on every over-the-counter medication in your cabinet. Even low-dose aspirin taken for heart protection can sustain an ulcer.

Acid-Reducing Medications

Regardless of the cause, nearly every ulcer treatment plan includes medication to reduce stomach acid. Less acid gives the damaged tissue a chance to repair itself. Two main classes of drugs do this job.

PPIs are the stronger option. They shut down acid production more completely and are the standard choice for most ulcer treatment. H2 blockers (like famotidine) are an older class that also reduce acid, though less aggressively. At 8 weeks, both classes achieve healing rates above 80%. PPIs tend to perform better at the 4-week mark, which is why they’re generally preferred when faster healing is important. For duodenal ulcers, over 90% heal within 6 to 8 weeks on either type of medication. Gastric ulcers take longer: roughly 80% heal by 8 weeks and over 90% by 12 weeks.

A mucosal protective agent called sucralfate works differently. Rather than reducing acid, it forms a physical barrier over the ulcer surface, shielding it from acid while it heals. It’s taken four times daily on an empty stomach, typically for 4 to 8 weeks. It’s used less commonly than PPIs today but remains an option, particularly for duodenal ulcers.

How Long Healing Takes

Most people start feeling better within a few days to a couple of weeks after beginning treatment, but symptom relief doesn’t mean the ulcer is healed. Duodenal ulcers (in the upper part of the small intestine) generally require 6 to 8 weeks of treatment. Gastric ulcers (in the stomach itself) are slower, often needing 8 to 12 weeks. Your doctor may recommend a follow-up endoscopy for gastric ulcers specifically, since these occasionally turn out to be malignant and need biopsy confirmation that they’ve fully healed.

When Ulcers Don’t Heal

An ulcer that persists after 8 to 12 weeks of standard treatment is considered refractory. About 10% of ulcers fall into this category. The first step is usually to double the PPI dose and continue for another 6 to 8 weeks. With this approach, roughly 90% of previously refractory ulcers will heal.

Beyond increasing medication, doctors work through a checklist of reasons the ulcer might be persisting. Were you taking the medication consistently and correctly? Is there a hidden H. pylori infection that tested falsely negative (which can happen when PPIs are already on board)? Are NSAIDs sneaking in through other medications? Are you still smoking? Each of these can silently sabotage healing. In rare cases, refractory ulcers point to conditions like Zollinger-Ellison syndrome, Crohn’s disease involving the stomach, infections like cytomegalovirus, or even cancer. For the small number of ulcers that resist all medical treatment, surgery may be considered.

Smoking, Alcohol, and Diet

Smoking has a clear, dose-dependent relationship with ulcer disease. Smokers have lower healing rates, faster recurrence, and a higher risk of perforation compared to non-smokers. The more cigarettes you smoke, the worse each of these outcomes becomes. Quitting is one of the most effective things you can do to support healing and prevent the ulcer from coming back.

Alcohol’s role is more nuanced. Moderate drinking doesn’t appear to significantly affect ulcer incidence or healing, but heavy, chronic alcohol use does increase the prevalence of duodenal ulcers. If you’re actively treating an ulcer, cutting back is reasonable since alcohol can irritate an already damaged stomach lining.

As for diet, the evidence may surprise you. Despite decades of bland-diet advice, researchers have not found that diet and nutrition play an important role in causing, preventing, or treating peptic ulcers. There’s no clinical basis for avoiding spicy foods, coffee, or citrus during treatment. The National Institute of Diabetes and Digestive and Kidney Diseases states plainly that doctors do not recommend following a special diet or avoiding specific foods or drinks. That said, if a particular food clearly worsens your symptoms, avoiding it during treatment is a practical, comfort-based decision rather than a medical one.

Recognizing an Emergency

Most ulcers heal uneventfully, but complications can be serious. A perforated ulcer, where the ulcer erodes completely through the stomach or intestinal wall, is a surgical emergency. Warning signs include sudden, severe abdominal pain (often described as sharp or knife-like), a rigid abdomen that’s extremely tender to touch, and signs of shock such as fainting, excessive sweating, or confusion. Vomiting blood or passing black, tarry stools suggests the ulcer is bleeding, which also requires immediate medical attention. These situations are uncommon but time-sensitive.