What to Take for a Stomach Ulcer and What to Avoid

The most effective treatment for a stomach ulcer depends on what caused it, but the cornerstone is an acid-suppressing medication called a proton pump inhibitor, or PPI. Brand names you’ll recognize include Nexium, Prevacid, and Prilosec. These are available over the counter and by prescription, and they work by blocking the enzyme your stomach uses to produce acid, giving the ulcer a chance to heal. Most ulcers take four to eight weeks to close up with consistent treatment.

Acid-Suppressing Medications

PPIs are the strongest option for reducing stomach acid. They shut down the “proton pump,” the chemical machinery your stomach cells rely on to make acid. The tradeoff is that they’re not instant relief. It can take one to four days before you feel the full benefit, but once they kick in, the suppression lasts much longer than other acid reducers. For an active ulcer, you’ll typically take a PPI once or twice daily for several weeks.

H2 blockers are a step down in potency. Familiar names include famotidine (Pepcid) and cimetidine (Tagamet), both available without a prescription. They work faster than PPIs, and their effects last about four to ten hours per dose. For mild ulcers or as a bridge while waiting for a PPI to reach full strength, H2 blockers can help. But because PPIs suppress acid more powerfully and for longer, they’re the preferred choice for healing an ulcer rather than just managing discomfort.

What Antacids Can and Can’t Do

Over-the-counter antacids like Tums (calcium carbonate) and Maalox (magnesium hydroxide, aluminum hydroxide) neutralize acid that’s already in your stomach. They work within minutes, which makes them useful for quick pain relief when an ulcer flares up. But the relief only lasts a few hours, and antacids do nothing to heal the ulcer itself. Think of them as a short-term comfort measure while your actual treatment does the repair work.

Treating the Root Cause: H. pylori Infection

A large share of stomach ulcers are caused by a bacterial infection called H. pylori. If testing confirms you have it, acid suppression alone won’t be enough. You’ll need a course of antibiotics alongside your PPI to clear the bacteria and prevent the ulcer from coming back.

The current recommendation from the American College of Gastroenterology is a 14-day regimen combining a PPI with two antibiotics and a bismuth compound (the active ingredient in Pepto-Bismol). This four-drug approach, called bismuth quadruple therapy, has replaced the older three-drug regimen that relied on clarithromycin, because bacterial resistance to clarithromycin has become widespread. The newer protocol is more complex (some of the antibiotics are taken three or four times a day), but it’s significantly more reliable at wiping out the infection.

Probiotics won’t replace antibiotics, but taking them alongside your treatment may improve the odds of success. Eleven separate meta-analyses have found that adding a probiotic, particularly strains of Lactobacillus, Bifidobacterium, or Saccharomyces, increased eradication rates. Probiotics also help offset the digestive side effects that come with taking multiple antibiotics for two weeks. The ideal strain and dose haven’t been pinned down yet, but a quality multi-strain supplement is a reasonable addition to your treatment plan.

Protective Coatings for the Ulcer

Sucralfate is a prescription medication that takes a different approach. Instead of reducing acid, it forms a protective barrier over the ulcer itself. Once it reaches the damaged tissue, it stimulates mucus and bicarbonate production, supports blood flow to the area, and binds growth factors that speed up tissue repair. It can even help maintain a healthy pH gradient across the stomach lining without raising overall stomach pH the way acid blockers do. Sucralfate is sometimes prescribed alongside a PPI, especially for ulcers that are slow to heal or in situations where additional mucosal protection is needed.

Pain Relievers That Make Ulcers Worse

If you have an active ulcer, the most important thing you can stop taking may matter as much as what you start. Nonsteroidal anti-inflammatory drugs, the category that includes ibuprofen (Advil, Motrin), naproxen (Aleve), and aspirin, are a major cause of stomach ulcers and will slow or prevent healing of an existing one. Research shows that continuous use for 30 days or more significantly raises the risk of developing peptic ulcers, with risk climbing the longer you take them.

If you need pain relief while dealing with an ulcer, acetaminophen (Tylenol) is the safer choice. It works through a different pathway and does not irritate the stomach lining. If you’ve been taking an NSAID daily for a chronic condition like arthritis, talk to your provider about alternatives before stopping, but do flag the ulcer so the medication plan can be adjusted.

Signs of a Serious Complication

Most ulcers heal without drama when treated properly, but complications can develop. A bleeding ulcer or a perforation (where the ulcer erodes all the way through the stomach wall) requires emergency care. Get to an emergency room if you experience any of the following:

  • Vomiting blood that’s bright red or looks like dark coffee grounds
  • Black, tarry, or very foul-smelling stools, which signal bleeding in the digestive tract
  • Severe abdominal pain, especially if your stomach is painful to touch
  • Sudden chest pain

These symptoms can escalate quickly. Bleeding ulcers account for a significant number of upper gastrointestinal emergencies each year, and early intervention makes a major difference in outcomes.

Putting It All Together

For most people, effective ulcer treatment looks like this: a PPI taken daily for four to eight weeks, with antibiotics added if H. pylori is present. Antacids can fill in for immediate pain relief. H2 blockers are a reasonable option if PPIs aren’t tolerated well. Avoiding NSAIDs during healing is essential. And while OTC options can get you started, a confirmed ulcer benefits from a proper diagnosis (usually through an endoscopy or a breath test for H. pylori) so the treatment actually targets the cause rather than just masking symptoms.