All conditions

Condition guide

Stomach ulcers and H. pylori

A peptic ulcer is a sore in the lining of your stomach or your duodenum, the first part of your small intestine. The most common symptom is a dull or burning pain in your upper belly that comes and goes, often when your stomach is empty or at night, though some people have no symptoms at all. The two most common causes are infection with H. pylori bacteria and taking NSAIDs such as aspirin, ibuprofen, and naproxen. Stress and spicy foods don't cause ulcers, but they can make them worse. Ulcers get worse if they aren't treated. Medicines that lower stomach acid help them heal, and a combination of antibiotics and other medicines gets rid of H. pylori. Antacids and milk can't heal an ulcer.

Medicines covered on KnowYourPills

This isn't a complete list of treatments — your doctor may recommend others, and the right choice depends on you.

To get rid of H. pylori (a combination your doctor prescribes)

To help the ulcer heal by lowering stomach acid

Besides medicine

  • Taking every dose of your H. pylori medicines exactly as prescribed; stopping early can let some bacteria survive and become resistant
  • Getting tested again for H. pylori, at least 4 weeks after you finish the antibiotics, to make sure the infection is gone
  • If an NSAID caused your ulcer, asking your doctor about stopping it, switching to a different one, taking a lower dose, or using a different pain medicine; if you need to keep taking NSAIDs, your doctor may add a PPI
  • Quitting smoking, which can lower your risk of ulcers and help ulcers heal
  • Avoiding alcohol

When to get help

  • Black or tarry stools, or red or maroon blood mixed with your stool — call or see your doctor right away
  • Red blood in your vomit, or vomit that looks like coffee grounds — call or see your doctor right away
  • Sudden, sharp, or severe belly pain that doesn't go away, feeling dizzy or fainting, or a rapid pulse or other signs of shock — call or see your doctor right away
  • Ulcer symptoms that change or get worse — call or see your doctor right away
  • An ulcer that doesn't heal or comes back after treatment — see your doctor, who may check for H. pylori again, prescribe more medicine, or recommend an endoscopy

Sources

Last updated November 30, 2026. Not yet reviewed by a pharmacist or physician — how our guides are made.

Educational only. This summary is drawn from public FDA labeling, MedlinePlus, and major clinical guidelines, and simplified for readability. Your prescription label and your pharmacist always come first — doses and instructions vary from person to person.