H. pylori (Helicobacter pylori) Tests

H. pylori tests detect whether you have H. pylori infection — a major cause of stomach ulcers and peptic ulcer disease. Four tests can detect signs of the bacteria: breath (urea) tests, stool tests, blood tests and upper endoscopy tests. A positive test result means you’ll need antibiotics to kill the bacteria and clear the infection.


What is an H. pylori (Helicobacter pylori) test?

Helicobacter pylori (H. pylori) tests show if you have an H. pylori infection. H. pylori is bacteria that infects your stomach or duodenum (the first part of your small intestine). An infection can cause irritation and inflammation in your stomach lining (gastritis) and lead to stomach ulcers and peptic ulcer disease. Infections can increase your risk of stomach (gastric) cancer.

H. pylori tests allow providers to diagnose these conditions. They can show if treatment has cured the infection.


Cleveland Clinic is a non-profit academic medical center. Advertising on our site helps support our mission. We do not endorse non-Cleveland Clinic products or services. Policy

When would I need an H. pylori test?

Your healthcare provider may order an H. pylori test if you have symptoms of a stomach ulcer or signs of gastritis, including:

What are the tests for H. pylori?

There are four tests for H. pylori. They check your breath, stool (poop), blood or stomach/small intestine lining for signs of the bacteria.

H. pylori breath test (urea breath test)

An H. pylori breath test is the most common test for H. pylori. It measures the amount of carbon dioxide in your breath after you drink a special solution containing urea. H. pylori bacteria break down urea into carbon dioxide. Excess carbon dioxide in your breath is a sign of an H. pylori infection.

H. pylori stool test

An H. pylori stool antigen test (SAT) detects antigens associated with H. pylori in your poop. An antigen is a protein that’s unique to a specific type of cell, virus or bacteria. They’re markers that allow your immune system (your body’s infection-fighting system) to identify germs. Having H. pylori antigens in your poop means you have the bacteria in your gut.

H. pylori blood test

An H. pylori blood test detects antibodies associated with an H. pylori infection. Antibodies are proteins your immune system makes if it detects a harmful antigen. The antibodies circulate in your bloodstream to find and destroy the offending germ (like H. pylori).

A downside of blood tests, compared to the others, is that they can’t distinguish between active infections and a past infection that’s already cleared. Antibodies can still circulate in your bloodstream after an infection is gone.

For this reason, providers mostly use blood tests to screen for H. pylori infections in populations where the bacteria are more common. H. pylori is more widespread in Africa, South America and western Asia.

Upper endoscopy (esophagogastroduodenoscopy)

An upper endoscopy is the most accurate at detecting H. pylori. But unlike the other tests, an endoscopy is invasive. Your provider may perform this test if they’re looking for other issues (like signs of cancer) in addition to H. pylori infection. This test involves using a scope to remove tissue from your stomach or duodenum and testing the sample for H. pylori.

Another name for an upper endoscopy is esophagogastroduodenoscopy (EGD).


Test Details

How does an H. pylori test work?

H. pylori tests check for signs of H. pylori bacteria. Breath, stool and upper endoscopy tests detect active infections. Blood tests detect whether you had an infection at some point (may or may not be active).

How do I prepare for the test?

Depending on the test, you may need to stop taking certain medications two to four weeks before the test. Some medicines can lead to false-negative results. This means your test comes back negative (no infection) even if you have an infection.

Your provider may ask that you stop taking:

  • Antibiotics or Pepto-Bismol® (oral bismuth subsalicylate).
  • Over-the-counter (OTC) or prescription proton pump inhibitors (PPIs), such as omeprazole (Prilosec®), lansoprazole (Prevacid®), pantoprazole (Protonix®), rabeprazole (AcipHex®) or esomeprazole (Nexium®), dexlansoprazole (Dexilant®).

They may ask you to fast (no eating or drinking) before the test.

Follow your provider’s instructions based on the test you’re getting.

What happens during the test?

What happens on the day of your appointment depends on how your provider chooses to test for H. pylori. You may need one test or a combination of tests.

  • H. pylori breath test: You’ll exhale into a balloon-like bag. Your provider will record how much carbon dioxide is present. Next, you’ll drink a solution with urea. After about fifteen minutes, you’ll exhale into a second bag. Your provider will record the amount of carbon dioxide in the second bag. More carbon dioxide the second time means you have an H. pylori infection.
  • H. pylori stool test: You’ll collect a stool sample in a container your provider gives you. Follow your provider’s instructions on where and when to drop it off for testing.
  • H. pylori blood test: A provider will collect a small sample of blood in a vial. The process will be the same as if you were having a routine blood test.
  • Upper endoscopy: You’ll receive a sedative or anesthesia so you won’t feel any pain. A provider will gently pass a thin scope with a camera from your mouth to your stomach or duodenum. The scope allows them to see and access the lining. They’ll use tiny tools inside the scope to remove a tissue sample for testing.

You’ll get to go home the same day as your test. You’ll need someone to drive you home after an endoscopy.

What should I expect after the test?

Your provider will send the samples to a lab for testing.

You can resume your normal activities after a breath, stool or blood test for H. pylori. You may need to take it easy the first 24 hours after an upper endoscopy. But most people resume their routine the next day.

Results and Follow-Up

What do the test results mean?

Your test results will be either positive or negative.

What does it mean if you test positive for H. pylori?

A positive result from the breath, stool or upper endoscopy tests means you have an active (current) H. pylori infection. You’ll need antibiotics to get rid of the bacteria. After you’ve taken them for long enough to kill H. pylori, you may need another test to ensure the infection’s gone.

A positive result on a blood test means you have or had an H. pylori infection. Your provider will advise you on the next steps based on your results.

What does it mean if you test negative for H. pylori?

A negative result is the same as a normal result. It means you don’t have an H. pylori infection.


When should I know the results of the test?

Results are usually ready within one to three days. Before leaving your appointment, ask your provider when you should expect results and how you’ll receive them.

Additional Common Questions

What is the most accurate test for H. pylori?

The most accurate test for detecting H. pylori is an upper endoscopy, but the best test for you depends on your situation. Here are a few things to consider:

  • An upper endoscopy is the most accurate test, but it’s also the most invasive and time-consuming. If your provider only needs to know whether you have an infection, they’ll likely start with a simpler test.
  • An H. pylori breath test is the most accurate test of the noninvasive tests, but it’s not available everywhere.
  • An H. pylori blood test is a simple procedure, but the results only show if you’ve had an H. pylori infection at some point. It can’t tell if you currently have one.

Your healthcare provider will recommend the best test for you based on your healthcare needs.

A note from Cleveland Clinic

An H. pylori test allows your healthcare provider to determine if a Helicobacter pylori infection is causing unpleasant symptoms like abdominal pain. If you have an infection, your provider will prescribe the medications you need to kill the bacteria and ease your symptoms while your stomach or small intestine lining heals.

Medically Reviewed

Last reviewed on 03/18/2024.

Learn more about our editorial process.

Appointments 216.444.7000