The most effective medicine for peptic ulcers is a type of acid-reducing drug called a proton pump inhibitor, or PPI. These medications shut down acid production at its source, allowing the ulcer crater to heal over a course of 4 to 8 weeks. But depending on what caused your ulcer, you may need more than one medication working together.
Proton Pump Inhibitors: The Primary Treatment
PPIs are the gold standard for ulcer healing. They work by permanently switching off the tiny acid pumps on the surface of stomach cells, which is the very last step in acid production. This makes them more powerful than any other class of acid-reducing medication. Common PPIs include omeprazole, lansoprazole, pantoprazole, esomeprazole, and rabeprazole.
A standard course for a peptic ulcer is typically one pill taken once daily, 30 minutes before breakfast. Treatment runs 4 to 8 weeks, and studies define successful healing as complete re-growth of the tissue lining the ulcer crater. Most people notice meaningful pain relief within a few days, though full healing takes the entire course. It’s important to finish the full treatment period even if symptoms improve early, because the tissue underneath is still repairing.
Common side effects during a standard course are mild: headache, nausea, constipation, or diarrhea. Long-term use (months to years) carries more serious but uncommon risks, including kidney problems, bone fractures, vitamin B12 and magnesium deficiencies, and a higher chance of certain gut infections. For a defined 4-to-8-week ulcer treatment, these long-term risks are far less of a concern.
H2 Blockers: A Lighter Alternative
H2 blockers reduce stomach acid by a different route. Instead of shutting down the acid pump directly, they block the signal that tells stomach cells to start producing acid. The result is about a 70% reduction in daily acid output, compared to the near-complete suppression PPIs provide. That makes them less potent for ulcer healing, but they still play a role, especially for milder cases or as a step-down after PPI therapy.
The most commonly used H2 blocker today is famotidine, available both over the counter and by prescription. It takes about an hour to start relieving symptoms after you take it. By comparison, PPIs can take one to four days to reach their full effect, though they last longer once they do. Your doctor might recommend an H2 blocker if your ulcer is small, if you can’t tolerate a PPI, or as maintenance therapy after the ulcer has healed.
Antacids for Quick Relief
Antacids (like calcium carbonate or magnesium hydroxide) neutralize acid that’s already in your stomach rather than preventing its production. They work faster than any other option, providing relief in minutes. The trade-off is that they wear off quickly and do nothing to actually heal the ulcer. Think of antacids as a bridge for pain relief while your PPI or H2 blocker does the real work.
Antibiotics for H. Pylori Ulcers
A large percentage of peptic ulcers are caused by a bacterial infection called H. pylori. If testing confirms you have this infection, acid-reducing drugs alone won’t solve the problem. The bacteria will keep damaging your stomach lining, and the ulcer will likely come back.
The standard approach combines a PPI with two or more antibiotics, taken together for 10 to 14 days. One widely recommended regimen is bismuth quadruple therapy, which pairs a PPI with bismuth (the active ingredient in Pepto-Bismol), tetracycline, and metronidazole. Other combinations exist, and your doctor will choose based on local antibiotic resistance patterns and your allergy history. These regimens can cause temporary side effects like nausea, a metallic taste, and diarrhea, but they successfully clear the infection in the large majority of cases.
Getting tested for H. pylori before starting ulcer treatment matters. If the infection is present and you only take acid reducers, you’re treating the symptom and not the cause.
Medicines for Ulcers Caused by Pain Relievers
The other major ulcer trigger is long-term use of NSAIDs like ibuprofen, naproxen, or aspirin. These drugs reduce the protective mucus layer in your stomach, leaving the tissue vulnerable to acid damage. The first step in treatment is stopping the NSAID if possible, then starting a PPI to let the ulcer heal.
For people who can’t stop taking NSAIDs (because of arthritis or heart conditions, for example), a medication called misoprostol can help prevent ulcers from forming. Misoprostol replaces the protective compounds that NSAIDs deplete. In clinical trials, it cut the rate of stomach ulcers from about 16% down to 4% over 12 weeks. The main downside is gastrointestinal side effects: cramping, diarrhea, and nausea are common, particularly at higher doses. About 20% of people taking it four times daily withdrew from studies due to side effects, compared to 12% on a twice-daily schedule. In practice, many doctors prescribe a PPI instead for NSAID ulcer prevention, since PPIs are better tolerated.
Mucosal Protectants
Sucralfate takes a completely different approach. Rather than reducing acid, it forms a paste-like coating over the ulcer crater, physically shielding it from acid and digestive enzymes. It also stimulates the stomach’s own protective mechanisms, boosting mucus and bicarbonate secretion. Sucralfate is less commonly used today because PPIs are more convenient and effective, but it remains an option for people who can’t take acid-suppressing drugs.
Bismuth subsalicylate (the pink liquid in Pepto-Bismol) offers a similar protective coating effect and has mild antibacterial properties. It’s most often used as part of H. pylori combination therapy rather than on its own.
How Long Healing Takes
With proper treatment, most duodenal ulcers (in the first part of the small intestine) heal within 4 weeks on a PPI. Stomach ulcers tend to be slower, often needing 6 to 8 weeks. Your doctor may repeat an endoscopy after treatment to confirm healing, particularly for stomach ulcers, since a small number turn out to be something more serious that requires further evaluation.
If your ulcer was caused by H. pylori, follow-up testing a few weeks after finishing antibiotics confirms the bacteria have been cleared. If the first round of antibiotics doesn’t work, a different combination is tried.
Warning Signs That Need Immediate Attention
Most ulcers respond well to medication, but some develop dangerous complications. Vomiting blood (which may look like coffee grounds), blood in your stool (especially dark, tarry, or maroon-colored stool), sudden severe abdominal pain, or feeling faint and dizzy are signs of bleeding or perforation. These situations require emergency medical care, not over-the-counter remedies.