H. pylori Tests: Breath, Stool, Blood and Endoscopy Explained
Written and medically reviewed by Dr. Baraa Alnahhal, MD · Last reviewed: November 2026 · How we review
Quick Answer: What is an H. pylori test?
H. pylori tests check for Helicobacter pylori, a bacterial infection that is a major cause of stomach ulcers and peptic ulcer disease. The four types are a breath (urea) test, a stool antigen test, a blood antibody test and an upper endoscopy with biopsy. [1]
The breath test is the most common and the most accurate noninvasive option. A positive breath, stool or endoscopy result usually means an active infection that needs antibiotics. [1]
What the research says
Breath tests are the most accurate noninvasive option. Across 101 studies with 11,003 people, at a fixed 90% specificity, urea breath tests detected 92% to 94% of infections, compared with 84% for blood tests and 83% for stool antigen tests. (Best et al., Cochrane Database of Systematic Reviews, 2018) [2]
Treating H. pylori can prevent new stomach cancers. In 396 people treated for early gastric cancer, eradication therapy cut new gastric cancers to 7.2% versus 13.4% with placebo over a median 5.9 years, and improved stomach lining atrophy in 48.4% versus 15.0%. (Choi et al., The New England Journal of Medicine, 2018) [3]
Key takeaways
H. pylori infection is a major cause of stomach ulcers and peptic ulcer disease. [1]
Tests include breath, stool, blood and upper endoscopy with biopsy. [1]
The breath test is the most common and most accurate noninvasive test. [1]
Antibiotics, bismuth and proton pump inhibitors can cause false negatives, so you may stop them a few weeks before. [1]
A positive blood test can reflect a past infection, not necessarily a current one. [1]
What is an H. pylori test?
H. pylori tests detect Helicobacter pylori infection, a major cause of stomach ulcers and peptic ulcer disease. H. pylori infects the stomach and small intestine and can damage the stomach lining over time, leading to irritation, gastritis or peptic ulcers. [1]
If your test is positive, you will need antibiotics to clear the infection. You may also need a test after treatment to make sure the infection is gone. [1]
When do you need an H. pylori test?
Your provider may suggest testing if you have: [1]
Gnawing or burning pain in the middle or upper belly, especially between meals or at night
Belly pain that gets better when you eat or take antacids
Bloating
Nausea or vomiting
Types of H. pylori tests

Four ways to test for H. pylori.
Test | How it works | What a positive result means |
Breath (urea) test | You drink a urea solution; H. pylori breaks it into carbon dioxide, and extra CO2 in your breath suggests infection | Usually an active infection |
Stool antigen test | A stool sample is checked for H. pylori antigens | Usually an active infection |
Blood test | A blood sample is checked for antibodies to H. pylori | A current or past infection |
Upper endoscopy (EGD) with biopsy | A thin tube with a camera takes tissue samples from your stomach | Usually an active infection |
Sources: [1]
Which H. pylori test is most accurate?
Upper endoscopy with biopsy is the most accurate test but also the most invasive, so it may be chosen when your provider also needs to check for other upper digestive problems. The breath test is the most accurate noninvasive test, though it may not be available everywhere. [1]
Antibodies can stay in your blood after the infection is gone, so a blood test mainly suggests past or current infection. Providers mostly use it to screen in regions where H. pylori is more common, such as Africa, South America and western Asia. [1]
How do you prepare for an H. pylori test?

These medicines can cause a false negative.
Some medicines can make a result look negative even when you have the infection. You may need to stop these a few weeks before the test: [1]
Antibiotics
Bismuth subsalicylate (Pepto-Bismol)
Proton pump inhibitors
You may also need to stop eating or drinking for a short time before the test. Follow your provider's exact instructions, and do not stop a prescribed medicine without asking. [1]
What happens during each test?

The breath test takes about 15 minutes between samples.
Breath test: You breathe into a bag, drink the urea solution and, after about 15 minutes, breathe into a second bag. More carbon dioxide in the second bag likely means infection.
Stool test: You collect a sample at home following the instructions you are given, then return it.
Blood test: Blood is drawn from a vein in your arm.
Upper endoscopy: Under sedation, a camera tube passes through your throat into your stomach and small intestine, and tiny tools may take tissue samples. It takes about an hour. You will need someone to drive you home and should rest for the day.
What do H. pylori test results mean?
Results are positive or negative and usually come back within one to three days. [1]
Positive breath, stool or endoscopy result: usually an active infection; you will typically need antibiotics.
Positive blood test: may mean a current or past infection; your provider will explain the next steps.
Negative result: no H. pylori infection. If symptoms continue, more tests may look for other causes.
Conclusion
H. pylori tests are a key step in finding the cause of ulcer-type belly pain. Breath and stool tests are simple and show active infection, while endoscopy is the most accurate when a closer look is needed. [1]
To avoid a false negative, ask your provider well in advance which medicines to pause, and plan on a follow-up test after treatment if your provider recommends it. [1]
Keep learning: Read our guides to H. pylori infection and peptic ulcer disease, or learn what to expect during an endoscopy. For more background, see MedlinePlus on H. pylori tests.
FAQ
What is an H. pylori test?
A test that checks for Helicobacter pylori, a stomach infection that commonly causes ulcers. [1]
What are the types of H. pylori tests?
Breath (urea), stool antigen, blood antibody and upper endoscopy with biopsy. [1]
Which H. pylori test is most accurate?
Endoscopy with biopsy; the breath test is the most accurate noninvasive test. [1]
How does the H. pylori breath test work?
You drink a urea solution; H. pylori turns it into carbon dioxide, which shows up in a second breath sample. [1]
What medicines should I stop before an H. pylori test?
Antibiotics, bismuth subsalicylate and proton pump inhibitors, often a few weeks before, as your provider directs. [1]
Do I need to fast for an H. pylori test?
You may need to stop eating or drinking for a short time beforehand. [1]
Can a blood test show active H. pylori?
Not reliably; antibodies can remain after the infection is gone. [1]
How long do H. pylori test results take?
Usually one to three days. [1]
What happens if my H. pylori test is positive?
You will typically need antibiotics to clear the infection. [1]
Do I need another test after treatment?
You may, to make sure the infection is gone. [1]
Related Reading
H. pylori Infection: The Stomach Germ Half the World Carries, Its Warning Signs, and How Antibiotics Clear It explains the infection these tests detect.
Peptic Ulcer Disease: Causes, Symptoms, Diagnosis, and Treatment covers the ulcers H. pylori commonly causes.
Gastritis: Symptoms, the 8 Risk Factors, and How to Calm an Inflamed Stomach Lining explains the stomach lining inflammation H. pylori can trigger.
Stomach Cancer (Gastric Cancer): Symptoms, Risk Factors, and Treatment Options Explained covers a cancer linked to long-term H. pylori infection.
MALT Lymphoma: Symptoms, Causes, and Treatment explains a stomach lymphoma linked to H. pylori.
References
Cleveland Clinic. H. pylori Tests: Types, How It's Done, Results. Cleveland Clinic. Last updated September 16, 2025. https://my.clevelandclinic.org/health/diagnostics/5217-h-pylori-tests
Best LM, Takwoingi Y, Siddique S, et al. Non-invasive diagnostic tests for Helicobacter pylori infection. Cochrane Database Syst Rev. 2018;3(3):CD012080. PMID 29543326. https://doi.org/10.1002/14651858.CD012080.pub2
Choi IJ, Kook MC, Kim YI, et al. Helicobacter pylori Therapy for the Prevention of Metachronous Gastric Cancer. N Engl J Med. 2018;378(12):1085-1095. PMID 29562147. https://doi.org/10.1056/NEJMoa1708423
Medical disclaimer
This article is for general education only and does not replace advice from a qualified healthcare professional. Talk to your doctor about your own diagnosis and treatment, and seek emergency care right away for severe or sudden symptoms.




Comments