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.
Advertisement
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
H. pylori tests show if you have an H. pylori infection. H. pylori (Helicobacter pylori) is a type of bacteria that infects your stomach and small intestine. These bacteria damage the lining of your stomach over time, which can lead to irritation, gastritis or peptic ulcers.
Advertisement
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
If you have symptoms of these conditions, your provider might suggest an H. pylori test. You might also need one after treatment to make sure the infection is gone. There are several types of Helicobacter pylori tests. Your provider will recommend the best one for you.
Your healthcare provider may order an H. pylori test if you have symptoms of a stomach ulcer or signs of gastritis. These may include:
There are four main ways your provider can test for an H. pylori infection:
Here’s what each test involves:
The H. pylori breath test is the most common test for H. pylori infection. 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.
An H. pylori stool antigen test (SAT) detects antigens associated with H. pylori in your poop. Antigens are markers that allow your immune system (your body’s infection-fighting system) to identify germs. Having H. pylori antigens in your poop means that you have the bacteria in your digestive tract.
Advertisement
An H. pylori blood test looks for antibodies linked to an H. pylori infection. Antibodies are proteins your immune system makes to fight germs. They travel through your blood looking for specific bacteria. These antibodies can still be in your blood even after the 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.
An upper endoscopy is the most accurate test for H. pylori. But unlike the others, it’s a bit more invasive. Your provider uses a thin tube with a camera to look inside your body and take small tissue samples (biopsies) to test in a lab.
They may choose this test if they need to check for other issues besides H. pylori.
You may need to stop taking some medications a few weeks before your H. pylori test. That’s because certain ones can affect your test results. They might make the test look negative even if you have an infection.
Your provider may ask you to stop taking:
You might also need to stop eating or drinking for a short time before the test.
Your provider will give you instructions based on the type of test you’re having.
What happens during your test depends on the type of H. pylori test your provider chooses. You may have one or more tests. Here’s what to expect with each one:
You’ll start by breathing into a balloon-like bag. This shows how much carbon dioxide is in your breath.
Then, you’ll drink a special liquid that contains urea. After about 15 minutes, you’ll breathe into a second bag.
If the second bag has more carbon dioxide, it means you likely have an H. pylori infection.
Your provider will give you a container to collect a stool (poop) sample at home. It will come with clear instructions on how to collect the sample and return it. Be sure to follow the steps carefully so your sample can be tested correctly.
This test works like any routine blood draw. A healthcare provider will use a needle to take a small sample of blood from your arm. They’ll collect it in a vial and send it to a lab for testing.
Upper endoscopy procedure
This test takes about an hour. You’ll get medicine to make you sleepy and comfortable.
Your provider will gently pass a long, thin tube with a camera (called an endoscope) down your throat and into your stomach and small intestine.
Advertisement
The camera sends images to a screen so your provider can check your stomach lining. They may also use tiny tools to take tissue samples for testing.
You can go home after the test, but someone will need to drive you because of the sedation.
What happens after the test?
After your test, you can go back to your normal routine.
If you had an endoscopy, you may want to take it easy for the rest of the day. The sedation can take time to wear off.
Your provider will send your blood, stool or tissue samples to a lab. You should get your results in a few days.
Your test results will be either positive or negative. This means the test will show if you have or don’t have an H. pylori infection.
A positive H. pylori test means you have — or had — an H. pylori infection.
If your breath test, stool test or endoscopy is positive, it usually means the infection is active. You’ll likely need antibiotics to treat it.
A positive blood test may show a current or past infection. Your provider will explain what it means and what to do next.
A negative result means you don’t have an H. pylori infection. If you still have symptoms, your provider may order more tests to look for other causes. Sometimes, the sample you gave for this test can help point to a different condition.
Advertisement
You’ll usually get your results within one to three days.
Before you leave your appointment, ask your provider when to expect the results and how you’ll get them.
The most accurate test for detecting H. pylori is an upper endoscopy and biopsy. But the best H. pylori test for you to take may depend on other factors. Here are a few things to consider:
Your healthcare provider will recommend the best test for you based on your healthcare needs.
There are several ways to test for an H. pylori infection. If you have certain symptoms, your healthcare provider might suggest an H. pylori test to check for infection. If the test is positive, you’ll take medication to kill the bacteria and help your stomach lining heal.
Advertisement
If you have issues with your digestive system, you need a team of experts you can trust. Our gastroenterology specialists at Cleveland Clinic can help.
Last reviewed on 09/16/2025.
Learn more about the Health Library and our editorial process.