How Do You Treat an Ulcer? Causes, Meds, Recovery

Most ulcers are treated with a combination of acid-reducing medication and, if a bacterial infection is involved, antibiotics. The specific treatment depends on what caused the ulcer in the first place. The two most common causes are infection with a bacterium called H. pylori and regular use of pain relievers like ibuprofen or naproxen (NSAIDs). Once the cause is identified, treatment typically heals the ulcer within 4 to 8 weeks.

Finding the Cause Comes First

Before starting treatment, your doctor will likely test for H. pylori infection, since this bacterium is responsible for a large share of peptic ulcers. Testing can be done through a breath test, stool sample, or blood test. You’ll also be asked about your use of NSAIDs and aspirin. The answer shapes everything that follows, because an ulcer caused by H. pylori requires antibiotics on top of acid-suppressing drugs, while an NSAID-related ulcer may heal with acid suppression alone once the offending medication is stopped.

In some cases, especially with stomach ulcers (as opposed to duodenal ulcers, which form in the upper small intestine), your doctor will recommend an endoscopy. This lets them see the ulcer directly, rule out anything more serious, and take tissue samples for H. pylori testing.

Treating an H. pylori Infection

If H. pylori is the culprit, clearing the infection is the most important step. The current preferred regimen, based on the latest American College of Gastroenterology guidelines, is called bismuth quadruple therapy. It involves four medications taken for 14 days: a proton pump inhibitor (PPI) taken twice daily, tetracycline four times daily, metronidazole three or four times daily, and bismuth (the active ingredient in Pepto-Bismol) four times daily.

This is a demanding regimen with a lot of pills, and side effects like nausea, metallic taste, and darkened stools are common. But completing the full 14 days is critical. Stopping early increases the chance the bacteria survive and develop resistance, making a second round of treatment harder. If the standard quadruple therapy doesn’t work or isn’t suitable, alternative options exist, including a rifabutin-based triple therapy. Doctors generally avoid using certain antibiotics like clarithromycin or levofloxacin unless lab testing confirms the bacteria are susceptible to them, because resistance to those drugs has become widespread.

Acid-Suppressing Medication

Regardless of the cause, nearly every ulcer treatment plan includes medication to reduce stomach acid. Less acid gives the damaged tissue a chance to heal. Proton pump inhibitors are the most effective option. These drugs block the enzyme responsible for acid production in the stomach lining, and they work significantly better than older alternatives called H2 blockers.

The difference is measurable. In studies comparing the two classes, PPIs healed 84% to 96% of ulcers over 4 to 8 weeks, while H2 blockers healed 57% to 86% over the same period. The gap was especially stark for stubborn ulcers that had resisted previous treatment: PPIs healed 96% of those cases at eight weeks, compared to just 57% with H2 blockers. PPIs are typically taken once or twice daily, and most people tolerate them well over the standard treatment course.

H2 blockers like famotidine still have a role, particularly for people who can’t take PPIs or who need a longer-term, lower-intensity option for maintenance after healing. But for active ulcer treatment, PPIs are the first choice.

When NSAIDs Are the Problem

If your ulcer was caused by regular NSAID use, the simplest and most effective step is to stop taking them. With the NSAID removed and a full-dose PPI prescribed for about 8 weeks, most ulcers heal on their own. Your doctor may suggest switching to acetaminophen for pain relief during this period, since it doesn’t carry the same risk to the stomach lining.

The situation gets more complicated when you can’t stop taking NSAIDs, which is common for people managing chronic conditions like arthritis. In that case, the recommended approach is to pair a daily PPI with the lowest effective dose of a COX-2 selective NSAID (a type that’s easier on the stomach) rather than a standard NSAID like ibuprofen or naproxen. This combination significantly reduces the risk of the ulcer returning or bleeding. If you’ve had a previous ulcer, this protective pairing is especially important any time you resume NSAID therapy.

Mucosal Protective Agents

A less commonly used but sometimes helpful medication is sucralfate. Rather than reducing acid, it works by forming a gel-like protective barrier over the ulcer site, shielding it from stomach acid and digestive enzymes. It also stimulates the stomach to produce more of its natural protective mucus and promotes tissue repair. For active duodenal ulcers, the standard course is four times daily on an empty stomach for 4 to 8 weeks, followed by twice-daily maintenance. Sucralfate is sometimes used alongside PPIs or as an alternative for people who need a different approach, though PPIs remain the primary treatment.

When an Ulcer Bleeds

The most serious complication of an untreated ulcer is bleeding. Slow, ongoing blood loss can lead to anemia, leaving you fatigued and short of breath. More rapid bleeding is a medical emergency. Warning signs include vomiting blood (which may look red or resemble dark coffee grounds), black or tarry stools, dizziness, and fainting.

A bleeding ulcer is treated through endoscopy, where a flexible tube with a camera is passed down the throat to the stomach. During this procedure, doctors can stop the bleeding using several techniques: injecting medication directly into the bleeding site, applying heat through electrocoagulation to seal the vessel, placing small metal clips to close it off, or spraying a clotting agent. These methods are effective for the vast majority of bleeding ulcers. In rare cases where the ulcer has eaten completely through the stomach or intestinal wall (a perforation), emergency surgery is needed to repair the hole and prevent a dangerous abdominal infection.

Recovery and Follow-Up

Most ulcers heal within 4 to 8 weeks of starting treatment. Duodenal ulcers tend to heal on the faster end of that range, while stomach ulcers can take the full 8 weeks or occasionally longer. You’ll likely notice symptom improvement, particularly less burning pain, within the first week or two, but it’s important to complete the full course of medication even after symptoms fade.

For stomach ulcers specifically, guidelines recommend a follow-up endoscopy within about 12 weeks to confirm the ulcer has fully healed. This is partly to ensure nothing more concerning was missed at the original diagnosis. Duodenal ulcers don’t typically require a follow-up endoscopy unless symptoms persist. If H. pylori was treated, your doctor will usually retest at least 4 weeks after finishing antibiotics to confirm the infection has been cleared.

Diet and Lifestyle During Healing

Despite widespread belief, there’s no special ulcer diet. The National Institute of Diabetes and Digestive and Kidney Diseases states directly that diet and nutrition have not been found to play an important role in causing, preventing, or treating peptic ulcers. You don’t need to avoid spicy food, coffee, or citrus to heal. That said, if a particular food consistently worsens your pain, it’s reasonable to skip it while you’re healing, not because it’s damaging the ulcer, but because it may irritate already-inflamed tissue.

Alcohol and smoking are the two lifestyle factors that do matter. Alcohol can irritate the stomach lining and slow healing, and smoking reduces blood flow to the stomach wall, impairing the body’s ability to repair itself. Cutting both during treatment gives your ulcer the best chance of healing on schedule and not coming back.