sofidexFor patientsAre you a clinician? Clinical site

Health Library  ›  Tests  ›  Tests for H pylori

Test

Tests for H pylori

Tests for H pylori look for evidence of bacteria that can infect the stomach lining.

9 min readTestReviewed 2026-08-24

PDF
What it measures
Evidence of H pylori bacteria living in the stomach
Sample
Breath, stool, or stomach tissue
Fasting needed?
Sometimes, for breath testing or endoscopy
How long it takes
Minutes for breath or stool; longer for endoscopy
Results in
One to several days; timing varies by laboratory
Used for
Diagnosing infection and confirming treatment worked
Main limitation
Acid suppressants, antibiotics, and bismuth can hide active infection

Overview

Helicobacter pylori, usually called H pylori, is a type of bacteria that can live in the stomach lining. Testing can show whether you have an active infection or, with some blood tests, whether you have been exposed in the past.

The main tests are:

  • Urea breath test: measures carbon dioxide in your breath after you swallow a special urea drink or capsule
  • Stool antigen test: looks for pieces of the bacteria in a bowel movement
  • Endoscopic biopsy: examines small tissue samples taken from the stomach during an upper endoscopy
  • Blood antibody test: looks for your immune response to the bacteria, but cannot reliably separate a current infection from an old one

Breath and stool tests are usually preferred when an endoscopy is not otherwise needed. They can also check whether treatment cleared the infection.

Why the test is ordered

Your clinician may order testing while investigating persistent indigestion, burning or discomfort in the upper abdomen, nausea, or a stomach or duodenal ulcer. A duodenal ulcer is an open sore in the first part of the small intestine.

Testing may also be considered if you have had an ulcer before, certain stomach conditions, or unexplained iron deficiency after other likely causes have been assessed. The reasons for testing can differ between adults and children.

After treatment, a breath test, stool antigen test, or sometimes a biopsy-based test is used to confirm that the bacteria are no longer detected. Symptoms alone cannot confirm that treatment worked.

Who should have the test

Testing is commonly considered for people with a current or previous peptic ulcer and for some people with ongoing indigestion. It may also be appropriate when an upper endoscopy is planned because of symptoms or other findings.

A non-invasive breath or stool test may be used for adults with indigestion who do not have features suggesting that endoscopy is needed promptly. Testing people without symptoms is not routine in every setting, although it may be offered in selected higher-risk situations.

Children with recurring abdominal pain are not automatically tested. In children, the priority is to find the cause of the symptoms, and testing is generally chosen only when the result is likely to change care.

Tell your clinician if you have trouble swallowing, unexplained weight loss, persistent vomiting, anaemia, or signs of bleeding. These do not prove a serious condition, but they may change which test is most appropriate.

How to prepare

Preparation depends on the test and the laboratory’s instructions.

For breath and stool tests, proton pump inhibitors such as omeprazole can make an active infection harder to detect. Potassium-competitive acid blockers can have a similar effect. You may be asked to stop these medicines for about two weeks.

Antibiotics and medicines containing bismuth can also cause a false-negative result. Testing is generally delayed until at least four weeks after these medicines or after treatment for H pylori. Do not stop a prescribed medicine without agreeing on a plan with your clinician.

Some breath tests require you to avoid food, drink, smoking, and chewing gum for a set period. The required fasting time differs by test kit and clinic. Stool testing does not usually require fasting.

An upper endoscopy requires fasting and may require changes to blood-thinning medicines or diabetes medicines. Follow the endoscopy unit’s instructions rather than general advice.

What happens during the test

For a urea breath test, you first breathe into a collection bag or tube. You then swallow urea containing a marked form of carbon. If H pylori is present, the bacteria break down the urea and produce marked carbon dioxide. A later breath sample measures this change.

For a stool antigen test, you collect a small bowel movement sample in a clean container. Avoid mixing it with urine or toilet water. Return or store it exactly as instructed.

During an upper endoscopy, a thin flexible camera passes through your mouth into your stomach. Sedation is often used. Small tissue samples may be tested under a microscope, with a rapid urease test, or by molecular testing or culture.

A blood test requires a blood sample from a vein. Because antibodies can remain after an infection has cleared, this test is usually not suitable for confirming an active infection or checking treatment success.

Understanding your results

Results are usually reported as positive, negative, or sometimes indeterminate rather than as a universal numerical range.

A positive breath, stool, or biopsy result generally supports an active H pylori infection. A positive blood antibody result may reflect either a current or previous infection, so another type of test may be needed.

A negative result means the test did not detect infection. It is more reassuring when you prepared correctly and had not recently taken medicines that suppress the bacteria. If the result does not fit your symptoms or medical history, repeat testing or a different method may be considered.

An indeterminate result means the laboratory could not clearly classify the sample. This may happen because of sample quality, a value close to the test threshold, or technical factors.

Results and interpretation vary by laboratory, age, sex, pregnancy status, medicines, and clinical context. Biopsy or molecular results may also include information about which antibiotics like amoxicillin or doxycycline are likely to work.

What affects the results

The most important causes of a false-negative result are medicines and testing too soon after treatment.

Proton pump inhibitors, potassium-competitive acid blockers, antibiotics, and bismuth can temporarily reduce the amount or activity of H pylori. The bacteria may still be present even though a breath, stool, or biopsy test is negative.

Other influences include:

  • Testing before enough time has passed after treatment
  • Active bleeding from a stomach or duodenal ulcer
  • Too few biopsy samples or samples taken from unaffected areas
  • Improper stool collection, storage, or transport
  • Not following fasting instructions for a breath test
  • Some other acid-reducing medicines like omeprazole or lansoprazole, depending on the test protocol

Age, kidney function, recent exercise, and the time of day do not usually change breath or stool results directly. Pregnancy may affect which test is chosen rather than whether the bacteria are present. A recent blood transfusion generally does not affect these tests.

Accuracy and limitations

When preparation is correct, well-validated urea breath and stool antigen tests detect most active infections. Neither test is perfect, and performance differs by test kit, laboratory, bacterial level, and recent medicine use.

Both tests can miss infection when acid-suppressing medicines, antibiotics, or bismuth have reduced the bacteria. A positive result when no active infection is present is less common, but it can occur because of technical or sample problems.

Biopsy testing can provide detailed information, but H pylori may be distributed unevenly across the stomach. Samples from several appropriate areas improve the chance of finding it. Endoscopy is more invasive and is not needed solely to test every person.

Blood antibody tests can remain positive for months or longer after the bacteria are gone. They may therefore say “positive” when there is no current infection and should not be used to confirm that treatment worked.

Culture or molecular testing may be better when previous treatment has failed or antibiotic resistance information is needed. Availability varies, and not every molecular test provides the same information.

Risks and complications

Breath and stool tests do not usually cause complications. The test drink may occasionally cause brief nausea or stomach discomfort.

A blood draw may cause a small bruise or brief soreness, and some people feel faint.

Endoscopy has additional risks from sedation and from passing the scope into the stomach. Bleeding after a small biopsy is usually minor. More serious bleeding, breathing problems, or a tear in the digestive tract are uncommon, and the endoscopy team should explain these risks beforehand.

What happens next

A positive result is usually followed by a discussion about treatment. The choice of medicines depends on factors such as previous antibiotic use, allergies, local resistance patterns, and any available resistance testing.

A follow-up breath or stool test is usually arranged to confirm that treatment worked. It is generally performed at least four weeks after antibiotics are finished and after an appropriate break from acid-suppressing medicines.

A negative result may need no further H pylori testing if it fits the clinical picture and preparation was correct. Persistent symptoms may still need routine follow-up because many conditions other than H pylori can cause upper abdominal symptoms.

Seek urgent medical advice for black, tar-like stools or repeated vomiting. Vomiting blood, fainting with possible internal bleeding, or sudden severe abdominal pain requires emergency assessment.

Common questions

Can I drink coffee before the test?

Not before a breath test if your instructions require fasting. Coffee can break the fast even without milk or sugar. Coffee does not usually affect a stool test.

Does the time of day matter?

Usually not. The timing is mainly chosen so you can complete any required fasting and attend the appointment.

Can I exercise beforehand?

Ordinary activity does not usually affect the result. Avoid eating or drinking during a required fasting period, including sports drinks.

Can I take my acid-reflux medicine?

Some acid-reducing medicines can cause a false-negative result. Ask for a specific plan before stopping them, especially if they control severe symptoms or protect against bleeding.

Can I do the test while pregnant?

Stool testing and non-radioactive carbon-13 breath testing may be options, but the reason and timing should be discussed with your maternity or medical team. Endoscopy and tests using radioactive carbon require individual consideration.

Why can’t a blood test check whether treatment worked?

Antibodies can remain in your blood after the infection has cleared. A breath or stool test is better for showing whether active bacteria remain.

Sources

  1. 1American College of Gastroenterology. ACG Clinical Guideline: Treatment of Helicobacter pylori Infection. American Journal of Gastroenterology, 2024.
  2. 2Malfertheiner P, Megraud F, Rokkas T, et al. Management of Helicobacter pylori infection: the Maastricht VI/Florence consensus report. Gut, 2022.
  3. 3National Institute for Health and Care Excellence. Dyspepsia and gastro-oesophageal reflux disease in adults: investigation and management (CG184).
  4. 4National Institute of Diabetes and Digestive and Kidney Diseases. Diagnosis of Peptic Ulcers.
  5. 5MedlinePlus. Helicobacter pylori Tests. U.S. National Library of Medicine.
  6. 6Homan M, Jones NL, Bontems P, et al. Updated joint ESPGHAN/NASPGHAN guidelines for management of Helicobacter pylori infection in children and adolescents. Journal of Pediatric Gastroenterology and Nutrition, 2024.

Cite this page

NLM

sofidex [Internet]. Daloreum; c2026. Tests for H pylori; [reviewed 2026 Aug 24; cited 2026 Nov 10]. Available from: https://sofidex.com/patients/tests/tests-for-h-pylori

APA 7th

sofidex. (2026, August 24). Tests for H pylori. Daloreum. Retrieved November 10, 2026, from https://sofidex.com/patients/tests/tests-for-h-pylori

AMA 11th

Tests for H pylori. sofidex. Reviewed August 24, 2026. Accessed November 10, 2026. https://sofidex.com/patients/tests/tests-for-h-pylori

The cited date is today’s, because a citation records when you read the page. The reviewed date is when a clinician last checked it.