H. pylori Testing: Breath, Stool, and Blood Tests Compared
H. pylori testing can be done with a breath test, a stool test, a blood test, or a biopsy taken during endoscopy. Breath and stool tests look for a current infection. A blood test detects antibodies, which can stay positive after the bacteria are gone.
Written By: DocAi Health Editorial Team
Last Updated: 2026-09-30
H. pylori testing can be done with a breath test, a stool test, a blood test, or a biopsy taken during endoscopy. Breath and stool tests look for a current infection. A blood test detects antibodies, which can stay positive after the bacteria are gone. Preparation matters, because some medicines can cause false negatives. This article compares each option, explains how to prepare, how to confirm treatment worked, and which symptoms need urgent care.
H. pylori testing: why it is done and what the options are
Helicobacter pylori (H. pylori) is a bacterium that lives in the lining of the stomach. Many people carry it without any symptoms. In others it is associated with gastritis, peptic ulcers, and, over many years, a higher chance of certain stomach cancers. The NIDDK explains that H. pylori infection is a common cause of peptic ulcers, though not the only one, since anti-inflammatory pain medicines such as ibuprofen and naproxen can also cause them.
A clinician may suggest testing if you have an active or past ulcer, ongoing indigestion without alarm features, a history of stomach lymphoma or early stomach cancer treatment, or a close relative with stomach cancer. Four main approaches exist:
- Urea breath test: detects a current infection without any needles.
- Stool antigen test: detects bacterial proteins in a stool sample.
- Blood antibody test: detects your immune response to the bacteria.
- Biopsy during endoscopy: a small tissue sample taken from the stomach lining.
The right choice depends on your symptoms, your medicines, and whether you have warning features that call for a direct look inside the stomach.
Side-by-side comparison
| Test | What it detects | Good for | Main limitation |
|---|---|---|---|
| Urea breath test | Active infection | Initial diagnosis and checking whether treatment worked | Can be falsely negative after acid-reducing medicine, antibiotics, or bismuth |
| Stool antigen test | Active infection | Initial diagnosis and confirming treatment; easy to do at home | Same medicine-related false negatives; requires a stool sample |
| Blood antibody test | Past or present exposure | Situations where the other tests are unreliable | Cannot tell active infection from a past one; stays positive after treatment |
| Endoscopy with biopsy | Bacteria in tissue, plus ulcers or other changes | People with warning symptoms or a need to look at the stomach | More invasive; needs sedation and a procedure |
The urea breath test
For this test you swallow a liquid or capsule containing urea that has been labeled with a harmless carbon marker. H. pylori makes an enzyme that breaks urea down. If the bacteria are present, the marker shows up in the air you breathe out. You breathe into a collection bag or tube before and again after the dose, and the lab compares the two samples.
The test is quick, usually done in a clinic or lab, and does not involve radiation or needles. It is widely used to diagnose a current infection and to check afterward whether treatment cleared it. You typically need to fast for a period beforehand, and the lab will give you its own instructions. Certain medicines can also change the result, as described in the medicine section below.
The stool antigen test
This test looks for H. pylori proteins in a small stool sample. Many labs provide a kit so you can collect the sample at home and return it. Like the breath test, it is aimed at a current infection, and clinicians often consider the two roughly comparable for this purpose when the test is done correctly.
Practical points to keep in mind: follow the collection instructions exactly, keep the sample as the kit directs, and avoid contaminating it with urine or toilet water. Loose or watery stool can make results harder to interpret, so tell the clinician if you have diarrhea when you collect it.
The blood antibody test
A blood test measures antibodies your immune system makes in response to H. pylori. It is convenient because it needs no special preparation and is not affected by acid-reducing medicine. The drawback is important: antibodies can remain in the blood for a long time after the bacteria have been cleared. A positive result may reflect an old infection that no longer needs treatment, and a blood test generally cannot show whether treatment worked.
For that reason, many clinicians prefer a breath or stool test when a current infection is the question. A blood test may still be reasonable in specific situations, such as when someone cannot stop certain medicines or when bleeding from an ulcer makes the other tests less reliable. Your clinician decides which fits your situation.
Endoscopy and biopsy
An upper endoscopy uses a thin, flexible camera passed through the mouth to view the esophagus, stomach, and first part of the small intestine. During the procedure the clinician can take small tissue samples. These can be examined under a microscope, tested quickly for the bacteria's enzyme, or grown in culture. Culture can also help guide antibiotic choice when earlier treatment has not worked.
Endoscopy is not the first step for everyone. It may be considered when there are warning features, such as trouble swallowing, unintended weight loss, persistent vomiting, signs of bleeding, or anemia, or when symptoms continue despite treatment. It lets the clinician look for ulcers and other conditions, which a breath, stool, or blood test cannot do.
Medicines that can affect breath and stool tests
Several common medicines can lower the number of bacteria enough to cause a false negative on breath and stool tests, which can be falsely reassuring:
- Proton pump inhibitors (acid reducers such as omeprazole, esomeprazole, or pantoprazole).
- Antibiotics, including ones taken for an unrelated infection.
- Bismuth-containing products, such as bismuth subsalicylate (Pepto-Bismol).
- H2 blockers (such as famotidine), which have a smaller effect on these tests than proton pump inhibitors. Some labs ask people to pause them briefly before a urea breath test, while others do not. Ask your clinician or the lab whether this applies to you, and do not stop a prescribed medicine on your own.
Gastroenterology society guidance commonly advises holding proton pump inhibitors for about 2 weeks, and antibiotics and bismuth products for about 4 weeks, before a breath or stool test. Labs may use different instructions, so treat these as general figures and follow your clinician's or lab's schedule. Do not stop a proton pump inhibitor or any other prescribed medicine on your own. Ask the prescriber first, especially if you have had an ulcer or bleeding, or take aspirin, NSAIDs, or blood thinners.
Acid protection may be part of your safety plan if you have bleeding symptoms, a past or current ulcer, reflux complications, or take NSAIDs (such as ibuprofen or naproxen), aspirin, or blood thinners. Your clinician may decide to pause a medicine, switch you to a different test, or do an endoscopy instead. Ask the prescriber or pharmacist, read the label of any over-the-counter product, and tell your clinician about everything you take.
Understanding your result
A positive breath or stool test generally suggests a current infection, and treatment is usually discussed. A negative result is usually reassuring, but if you were taking an interfering medicine when you were tested, the clinician may repeat the test or choose another method. A positive blood antibody test alone is harder to interpret and may need follow-up, depending on your history.
Testing is generally recommended for people with an active or past ulcer, and clinicians also consider it in some people with indigestion or a family history of stomach cancer. Treatment is offered when a current infection is found. It usually involves a combination of antibiotics along with acid-reducing medicine, sometimes with bismuth. Regimens vary, and resistance to some antibiotics is a recognized problem. Tell the prescriber about drug allergies, past antibiotic courses, and other medicines you take, and ask the pharmacist about side effects and how to take the combination.
Confirming that treatment worked
After a course of treatment, clinicians generally advise a repeat test to check that the bacteria are gone, particularly for people with an ulcer or a history of one. A breath or stool test is the usual choice. Testing too soon after antibiotics or while on acid reducers can give a falsely negative result. Gastroenterology guidance commonly suggests testing at least about 4 weeks after antibiotics, with proton pump inhibitors held for about 2 weeks beforehand, but your prescriber will set the timing and tell you which medicines, if any, to pause. A blood antibody test is not a good way to check, because antibodies can persist.
Other causes of upper abdominal symptoms and related tests
Upper abdominal pain, bloating, and nausea have many causes, including acid reflux, medicine-related irritation, gallbladder problems, and inflammatory bowel conditions such as Crohn's disease. A positive H. pylori test does not exclude other causes, and the clinician will consider the whole picture.
If you see blood in the stool, the question is different from this one. See our article on What Does Blood in Your Stool Mean? For a positive FIT result, see Positive FIT Stool Test: What Comes Next? The MedlinePlus page on gastrointestinal bleeding describes how bleeding from the digestive tract can look and what can cause it.
What to expect and what to ask your clinician
Before testing, tell your clinician about every prescription and over-the-counter medicine you take, including antacids, ibuprofen, naproxen, aspirin, and bismuth products. Mention any history of ulcers, stomach cancer in a close relative, long-term pain-reliever use, or anemia. These details help the clinician decide whether a noninvasive test is enough or whether endoscopy is more appropriate.
Questions that can be useful to raise: Which test fits my situation? Which of my medicines can affect the result, and how should I handle them? When should I be retested after treatment? Are there symptoms that should prompt me to call sooner?
When to Seek Medical Care
When to Seek Urgent or Emergency Care
H. pylori can be linked to ulcers, and an ulcer can bleed or perforate. These signs of serious bleeding or a hole in the stomach wall need emergency care rather than waiting for a test appointment. This guidance is in addition to, not a replacement for, the general disclaimer above.
Emergency, call 911 or go to the emergency room immediately if:
- Vomiting blood, or vomit that looks like coffee grounds, can be a sign of bleeding from an ulcer and needs emergency care.
- Black, tarry, sticky stools with a strong odor, especially with dizziness or weakness, can signal significant upper digestive bleeding.
- Sudden, severe abdominal pain with a rigid, hard belly or pain that worsens with any movement can signal a perforated ulcer.
- Fainting, near-fainting, a racing heart, or cold clammy skin with stomach pain or any sign of bleeding can mean serious blood loss; call 911.
- Heavy rectal bleeding, or any bleeding with confusion, fainting, or severe weakness, needs emergency care.
See a doctor soon (same-day or next available appointment) if:
- Ongoing difficulty swallowing, or food that seems to get stuck, should be evaluated promptly because it may call for an endoscopy.
- Unintended weight loss, loss of appetite, or feeling full after only a few bites that lasts for weeks should be evaluated promptly by a clinician, who may recommend endoscopy.
- Repeated vomiting that prevents you from keeping food or fluids down needs prompt evaluation to prevent dehydration.
- Fatigue, paleness, or a low hemoglobin result with stomach symptoms can suggest slow bleeding; contact your clinician promptly, and seek same-day care if you also feel dizzy or short of breath.
- Upper abdominal symptoms that persist after treatment, or a repeat test that remains positive, should be reviewed with the prescriber.
Frequently Asked Questions
Which H. pylori test is most accurate?
Breath and stool antigen tests are generally considered reliable for detecting a current infection when you prepare correctly. Biopsy during endoscopy can also be accurate, though results depend on the method and sampling. Blood antibody tests are less useful for current infection. Accuracy for any test can be affected by recent antibiotics, bismuth, or acid-reducing medicine, so tell your clinician what you take.
Can I take omeprazole before an H. pylori breath test?
Acid reducers such as omeprazole can lower the number of bacteria enough to cause a false negative. Clinicians commonly ask people to pause them for a period beforehand, but the timing varies. Do not stop a prescribed medicine on your own. Ask the prescriber or pharmacist whether pausing is appropriate for you or whether another test fits better.
Does a positive H. pylori blood test mean I have an active infection?
Not necessarily. A blood test detects antibodies, which can remain after the bacteria are gone. A positive result may reflect past exposure. Clinicians combine your history, symptoms, prior treatment, and sometimes a breath or stool test to decide whether you have a current infection that needs treatment.
Can I do an H. pylori stool test at home?
Many stool antigen kits let you collect the sample at home and send it to a lab, though availability depends on your clinician and lab. Follow the instructions carefully, avoid contaminating the sample with urine or toilet water, and report recent antibiotics, bismuth, or acid-reducing medicine, since these can affect the result.
How soon after treatment should I be retested?
Testing too soon can give a falsely negative result, so the timing depends on your regimen and medicines. Your prescriber will tell you when to schedule a breath or stool test and whether to pause acid reducers first. Blood antibody tests are generally not used to check, because antibodies can stay positive.
Do I need an endoscopy to diagnose H. pylori?
Many people do not. A breath or stool test can often diagnose a current infection. Endoscopy is more likely to be considered when there are warning features such as trouble swallowing, unintended weight loss, persistent vomiting, bleeding, or anemia, or when symptoms continue despite treatment. Your clinician weighs your age, history, and symptoms.
Is H. pylori contagious?
The exact way H. pylori spreads is not fully understood. It is thought to pass from person to person through contact with saliva, vomit, or stool, and possibly through contaminated food or water. Handwashing and safe food and water practices can help. Ask your clinician whether household members should be tested.
Related articles
What Does Blood in Your Stool Mean?Elevated Amylase or Lipase: Is It Pancreatitis?Low Hemoglobin: Causes and Next StepsSources
- NIDDK (NIH) - Peptic Ulcers (Stomach Ulcers)
- MedlinePlus (NIH) - H. pylori Infections
- MedlinePlus (NIH) - Gastrointestinal Bleeding
- MedlinePlus (NIH) - Crohn's Disease