Diagnosis

Diagnosis of an H. pylori infection involves testing to find out if your symptoms are caused by H. pylori germs. Your healthcare professional may recommend one or more of the following tests:

Stool tests

A lab checks a sample of your stool for signs of H. pylori germs. These tests include:

  • Stool antigen test. This common stool test looks for proteins called antigens related with H. pylori infections.
  • Stool PCR test. A polymerase chain reaction (PCR) test also can find an H. pylori infection in stool. The test can find gene changes that may be resistant to antibiotic medicines used to treat H. pylori infections. However, this test is more expensive than a stool antigen test and may not be available at all medical centers.

Breath test

You might hear this called a urea breath test. During the test, you swallow a pill, liquid or pudding that contains tagged carbon molecules in a substance called urea. If you have an H. pylori infection, carbon is released when the solution makes contact with the germs. This breaks down the urea, releasing the carbon.

Because your body absorbs the carbon, it is released when you breathe out. To measure the release of carbon, you blow into a bag. A device detects the carbon molecules to find out if more are released after taking the substance that contains urea. This test can be used for adults and children older than 6 who can follow along with the test instructions.

Scope test

This test checks your upper digestive system. It's also called an upper endoscopy exam. Your healthcare professional may recommend it to check on symptoms that may be caused by a peptic ulcer or gastritis. These and certain other conditions can stem from H. pylori infections.

For this exam, you're given medicine to help you relax. Then, your healthcare professional threads a camera attached to a long, flexible tube down your throat and esophagus. This tool is called an endoscope.

The endoscope goes into your stomach and the first part of the intestine, called the duodenum. It lets your healthcare professional view any issues in your upper digestive tract. Your healthcare professional also might use the endoscope to take tissue samples. This is called a biopsy. These samples are checked by a lab for an H. pylori infection.

An upper endoscopy is more invasive than a breath or stool test. So it's often not used to diagnose an H. pylori infection alone. Healthcare professionals may use an upper endoscopy for further testing and to look for other digestive conditions. They also can use this test to figure out exactly which antibiotic is best to treat H. pylori infection, especially if the first antibiotics tried didn't get rid of the infection.

This test may need to be done again after treatment for an H. pylori infection. It depends on what is found at the first endoscopy or if your symptoms continue after treatment.

Testing considerations

The same tests used for diagnosis can be used to tell if the H. pylori infection is gone after treatment. In general, you wait at least four weeks after you finish your antibiotic treatment to get these follow-up tests.

If your treatment includes certain other medicines, you'll also need to wait up to two weeks before follow-up testing. These medicines can affect the accuracy of the test results and include:

  • Medicine that can be used for ulcer treatment called bismuth subsalicylate (Pepto-Bismol).
  • Medicines to lessen stomach acid called proton pump inhibitors and histamine (H-2) blockers.

Your healthcare professional gives you specific instructions about your medicines.

The role of screening tests

In places where H. pylori infections and their complications are common, healthcare professionals sometimes test healthy people for H. pylori. This is called screening. Whether there is a benefit to this testing when you have no symptoms of infection is controversial among experts.

If you're concerned about an H. pylori infection, talk with your healthcare professional. Together you can decide whether H. pylori testing might be right for you. For example, your healthcare professional may recommend screening if you have a high risk of stomach cancer. Treatment may lower the chances that a stomach ulcer caused by an H. pylori infection becomes cancerous.


Treatment

Treatment for H. pylori infections usually involve taking at least two different antibiotics at once. This helps prevent the germs from resisting the effects of one particular antibiotic.

Treatment also may include medicine to help your stomach heal, such as:

  • Proton pump inhibitors (PPIs). These medicines stop acid from being made in the stomach. Some examples of PPIs are omeprazole (Prilosec), esomeprazole (Nexium), lansoprazole (Prevacid) and pantoprazole (Protonix).
  • Bismuth subsalicylate. This medicine works by coating an ulcer and protecting it from stomach acid.
  • Histamine (H-2) blockers. These medicines block a substance called histamine, which triggers the stomach to make acid. One example is cimetidine (Tagamet HB). H-2 blockers are prescribed for H. pylori infection only if PPIs can't be used.

Follow-up testing for H. pylori at least four weeks after your treatment is recommended. If the tests show that the treatment didn't work, you may need more treatment with a different mix of antibiotics.

Clinical trials

Explore Mayo Clinic studies testing new treatments, interventions and tests as a means to prevent, detect, treat or manage this condition.


Preparing for your appointment

See your healthcare professional if you have symptoms of an H. pylori infection. Your healthcare team may test and treat you for H. pylori infection. Or you might be referred to a healthcare professional called a gastroenterologist, who treats diseases of the digestive system.

Here's some information to help you get ready for your healthcare appointment, and what to expect.

What you can do

At the time you make the appointment, ask if there's anything you need to do in advance. For example, you might be told to restrict your diet.

Also, preparing a list of questions to ask may help you make the most of your time with your healthcare professional. Questions to ask include:

  • How did an H. pylori infection cause the complications I'm having?
  • Can an H. pylori infection cause other complications?
  • What kinds of tests do I need?
  • Do I need to do anything to prepare for these tests?
  • What treatments are available?
  • What treatments do you recommend?
  • How will I know if the treatment worked?

Feel free to ask any other questions during your appointment.

What to expect from your doctor

Your healthcare professional is likely to ask you questions such as:

  • Have your symptoms been constant, or do they come and go?
  • How serious are your symptoms?
  • When did your symptoms start?
  • Does anything make them better or worse?
  • Have your parents or siblings ever had similar symptoms?
  • What medicines or supplements do you take regularly?
  • Do you take any pain relievers such as aspirin, ibuprofen (Advil, Motrin IB, others) or naproxen sodium (Aleve)?

Be ready to provide information and answer questions. It may give you more time to cover other points you want to talk about with your healthcare team.


May 14, 2025

  1. AskMayoExpert. Helicobacter pylori (adult). Mayo Clinic; 2023.
  2. Chey WD, et al. ACG clinical guideline: Treatment of Helicobacter pylori infection. American Journal of Gastroenterology. 2017; doi:10.1038/ajg.2016.563.
  3. Helicobacter pylori infection. Merck Manual Professional Version. https://www.merckmanuals.com/professional/gastrointestinal-disorders/gastritis-and-peptic-ulcer-disease/helicobacter-pylori-infection. Accessed Dec. 18, 2023.
  4. Bittencourt de Brito B, et al. Pathogenesis and clinical management of Helicobacter pylori gastric infection. World Journal of Gastroenterology. 2019; doi:10.3748/wjg.v25.i37.5578.
  5. Peptic ulcer disease. American College of Gastroenterology. https://gi.org/topics/peptic-ulcer-disease/. Accessed Dec. 18, 2023.
  6. H. pylori. American College of Gastroenterology. https://gi.org/topics/h-pylori/. Accessed Dec. 18, 2023.
  7. Piscione M, et al. Eradication of Helicobacter pylori and gastric cancer: A controversial relationship. Frontiers in Microbiology. 2021; doi:10.3389/fmicb.2021.630852.
  8. Peptic ulcers (stomach ulcers). National Institute of Diabetes and Digestive and Kidney Diseases. https://www.niddk.nih.gov/health-information/digestive-diseases/peptic-ulcers-stomach-ulcers/all-content. Accessed Dec. 18, 2023.
  9. Wing EJ, et al., eds. Diseases of the stomach and duodenum. In: Cecil Essentials of Medicine. 10th ed. Elsevier; 2022. https://www.clinicalkey.com. Accessed Dec. 18, 2023.
  10. Loscalzo J, et al., eds. Helicobacter pylori infections In: Harrison's Principles of Internal Medicine. 21st ed. McGraw Hill; 2022. https://accessmedicine.mhmedical.com. Accessed Dec. 18, 2023.
  11. Medical review (expert opinion). Mayo Clinic. Dec. 29, 2023.
  12. Gold BD, et al. Helicobacter pylori: Diagnosis and management in the pediatric patient. https://www.uptodate.com/contents/search. Accessed Dec. 19, 2023.
  13. Helicobacter pylori (h. pylori) infection. International Foundation for Gastrointestinal Disorders. https://iffgd.org/gi-disorders/other-disorders/helicobacter-pylori-h-pylori-infection/. Accessed Dec. 18, 2023.
  14. Ferri FF. Helicobacter pylori infection. In: Ferri's Clinical Advisor 2024. Elsevier; 2024. https://www.clinicalkey.com. Accessed Dec. 18, 2023.
  15. Helicobacter pylori (h. pylori) and cancer. National Cancer Institute. https://www.cancer.gov/about-cancer/causes-prevention/risk/infectious-agents/h-pylori-fact-sheet. Accessed Dec. 18, 2023.
  16. Gong RJ, et al. Polymerase chain reaction-based tests for detecting Helicobacter pylori clarithromycin resistance in stool samples: A meta-analysis. World Journal of Clinical Cases. 2021; doi:10.12998/wjcc.v9.i1.133.

CON-20301708

Join the fight against cancer!

Make a gift to our 2025 Drive to Cure Cancer and transform the way cancer is treated and defeated.