Types

Understanding H. pylori and Ulcers

Choose a preferred language

Ulcers are sores in the lining of your digestive tract. They were once thought to be caused by too much spicy food, stress, or anxiety. It's now known that most ulcers are likely due to infection with bacteria known as Helicobacter pylori ( H. pylori). They could also be from using anti-inflammatory medicines, such as aspirin and other nonsteroidal anti-inflammatory drugs. These include ibuprofen and naproxen.

Cross section of stomach showing ulcers in stomach and duodenum.


Common ulcer symptoms

Symptoms include:

  • Burning, cramping, or hunger-like pain in the stomach area, often 1 to 3 hours after a meal or in the middle of the night.

  • Pain that gets better or worse with eating.

  • Upset stomach (nausea) or vomiting.

  • Black, tarry, or bloody stools. (This means the ulcer is bleeding.)

Some people have no symptoms.


Your evaluation

An evaluation by your health care provider can show if you have an ulcer and find out if it was caused by H. pylori . Your provider may ask you questions, examine you, and possibly do some tests. These may include:

  • Upper GI series. This is a special X-ray that's done to help locate an ulcer. Before the test, you drink a chalky liquid, called barium. This liquid helps the ulcer show up on the X-ray.

  • Endoscopic exam. This test is done with a long tube with a camera on the end. The tube is passed through your mouth into your stomach, and allows the provider to get a closer look at your ulcer. You'll be lightly sedated for this procedure. Your provider can also take a tissue sample to test for H. pylori .

  • Other tests. Blood, stool, and breath tests may also be done to show if you have H. pylori in your digestive tract.


Your treatment

To treat the H. pylori bacteria so your ulcer can heal, your health care provider will likely prescribe antibiotics. Other ulcer medicines that help reduce stomach acid may also be prescribed as well. Testing after treatment may be advised to be sure the H. pylori infection is gone. Usually, treating the H. pylori infection helps prevent the ulcer from returning. But you can have ulcers more than once in your lifetime. 

Online Medical Reviewer: Jen Lehrer MD

Online Medical Reviewer: Rita Sather RN

Online Medical Reviewer: Robyn Zercher FNP

Date Last Reviewed: 01/01/2025

© 2000-2026 The StayWell Company, LLC. All rights reserved. This information is not intended as a substitute for professional medical care. Always follow your healthcare professional's instructions.

Start your journey toward better health

Select a primary care physician who will deliver personal care, close to home.

Find a Doctor

We have more than 4,500 specialty care physicians in our network

We have you covered from head (neurosurgery) to toe (podiatry.) And everything in-between!

Find a Doctor

Need Help?

Get the right care at the right time.

Learn More
Related Articles
Read article
Digestive Health
Bacterial Gastroenteritis

Gastroenteritis is often called the stomach flu. Bacterial gastroenteritis is caused by bacteria, and often causes severe symptoms. Read on to learn more, including how it can be spread, prevention, symptoms, and treatment.

Read article
Digestive Health
Understanding Intestinal Obstruction

An intestinal obstruction means that the small or large intestine is blocked at one or more spots. This prevents air, food, stool, and fluid from passing normally through the digestive system.

Read article
Digestive Health
Irritable Bowel Syndrome

Irritable bowel syndrome is a disorder of the intestines. Learn what it is and how to manage it.

Read article
Digestive Health
Noninfectious Gastroenteritis (Adult)

Gastroenteritis can cause nausea, vomiting, diarrhea, and abdominal cramping. Here's how to take care of yourself at home and when to call your healthcare provider.