Most stomach ulcers heal within 4 to 8 weeks with the right medication, but effective treatment depends on what caused the ulcer in the first place. The two most common causes are a bacterial infection called H. pylori and regular use of pain relievers like ibuprofen or aspirin. Treatment targets the specific cause while also reducing stomach acid to let the damaged tissue repair itself.
Finding the Cause Before Starting Treatment
Before jumping to treatment, your doctor needs to determine whether H. pylori is involved. This matters because an ulcer caused by bacteria requires antibiotics on top of acid-reducing medication. The urea breath test is the most accurate non-invasive option, with 97% sensitivity and 100% specificity. A stool test is another common choice, though slightly less precise. If you have worrying symptoms like unexplained weight loss, trouble swallowing, bloody vomit, or dark tarry stools, an endoscopy (a thin camera passed down the throat) is typically used instead, since it lets doctors both see the ulcer and take a tissue sample.
Acid-Reducing Medication
Regardless of the cause, nearly every ulcer treatment plan starts with a proton pump inhibitor, commonly called a PPI. These drugs shut down the acid pumps on the cells lining your stomach, dramatically lowering the amount of acid your stomach produces. You’ve probably seen brand names like omeprazole (Prilosec) or pantoprazole (Protonix) at the pharmacy. PPIs are the backbone of ulcer treatment because they create the low-acid environment the ulcer needs to close up.
A second, older class of acid reducers called H2 blockers works differently: they block histamine signals that tell your stomach to produce acid. Famotidine (Pepcid) is the most widely used. H2 blockers are less potent than PPIs and are more often used for milder cases or as a follow-up after the initial healing phase.
Treating an H. Pylori Infection
If testing confirms H. pylori, you’ll need antibiotics alongside your PPI. The current recommendation from the American College of Gastroenterology is a 14-day course of bismuth-based quadruple therapy. This combines a PPI taken twice daily with three other medications: tetracycline, metronidazole, and a bismuth compound (the active ingredient in Pepto-Bismol). It’s a lot of pills, four times a day for two of the medications, but the regimen works well precisely because it attacks the bacteria from multiple angles.
You may have heard of the older “triple therapy” that pairs a PPI with clarithromycin and amoxicillin. That approach is now falling out of favor. Resistance to clarithromycin has exceeded 15% in the majority of countries studied, with rates ranging from 12% to over 90% depending on the region. Because of this, guidelines now specifically recommend against using clarithromycin-based triple therapy unless lab testing has confirmed the bacteria in your stomach are sensitive to it. Bismuth-based quadruple therapy sidesteps this resistance problem, which is why it’s become the preferred first-line option.
For H. pylori-related ulcers, the antibiotic course alone heals more than 90% of ulcers. Additional weeks of PPI therapy after finishing antibiotics generally don’t improve outcomes.
Reducing Side Effects With Probiotics
Two weeks of four medications predictably causes digestive side effects, especially diarrhea and nausea. A meta-analysis of 19 randomized trials covering nearly 3,000 patients found that adding probiotics to bismuth quadruple therapy cut side effects roughly in half. Diarrhea and nausea specifically dropped by about two-thirds. Not all probiotics performed equally: only Saccharomyces boulardii (a yeast-based probiotic) and multi-strain formulations significantly helped. Single-strain Lactobacillus or Bifidobacterium supplements showed no meaningful benefit. The probiotics also nudged overall eradication rates up from about 79% to 86%.
Treating NSAID-Caused Ulcers
If your ulcer was caused by regular use of NSAIDs like ibuprofen, naproxen, or aspirin, the first step is stopping the offending medication. NSAIDs block the protective mucus layer your stomach uses to shield itself from its own acid, so continuing to take them while trying to heal an ulcer works against your treatment.
After stopping the NSAID, PPI therapy is the standard treatment. The timeline depends on where the ulcer is. Duodenal ulcers (in the first part of the small intestine) typically heal within 4 weeks on a PPI. Gastric ulcers (in the stomach itself) take longer: 8 weeks of PPI treatment produces significantly better healing rates than 4 weeks. Your doctor may schedule a follow-up to confirm the ulcer has closed, particularly for gastric ulcers.
If you need ongoing pain relief, talk to your doctor about alternatives. Acetaminophen (Tylenol) doesn’t carry the same ulcer risk. In some cases, a selective COX-2 inhibitor paired with a PPI may be an option, though this is a conversation tailored to your specific situation.
Protective Medications
In some cases, your doctor may add a medication called sucralfate. Rather than reducing acid, sucralfate works like a bandage: it physically sticks to the damaged ulcer tissue and shields it from acid and digestive enzymes while it heals. It’s taken on an empty stomach, either one hour before or two hours after meals, four times daily during active treatment. Once the ulcer heals, the dose drops to twice daily if used for prevention. Sucralfate is typically a supporting player alongside a PPI rather than a standalone treatment.
Diet, Smoking, and Lifestyle
Despite decades of advice about bland diets and avoiding spicy food, research hasn’t found that any specific diet causes, prevents, or treats ulcers. 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 for ulcer management. That said, if certain foods consistently make your symptoms worse, it’s reasonable to avoid them during healing. Coffee and alcohol are common triggers for discomfort even though they don’t change healing time.
Smoking is the one lifestyle factor with clear evidence behind it. Quitting smoking lowers the risk of developing new ulcers and helps existing ones heal faster.
Signs of a Serious Complication
Most ulcers heal without incident, but a small percentage perforate (break through the stomach wall) or bleed heavily. These are medical emergencies. Seek immediate care if you experience sudden, sharp abdominal pain with a rigid abdomen that’s tender to touch, vomit blood, pass maroon or black tarry stools, or develop signs of shock like fainting, excessive sweating, or confusion. A bleeding ulcer can also cause a gradual drop in red blood cells, showing up as fatigue, lightheadedness, or pale skin before anything more dramatic happens.