Helicobacter pylori test
Informed by recognized medical guidance
Overview
A Helicobacter pylori (H. pylori) test checks for an infection in your stomach caused by a type of bacteria. This germ can live in the stomach lining and sometimes cause ulcers or other problems.
Key facts
- H. pylori is a common bacteria that infects the stomach lining in many people worldwide.
- Most people with H. pylori never have symptoms, but it can cause stomach ulcers and increase the risk of stomach cancer.
- The infection is treatable with a course of medicines, usually antibiotics and acid-suppressing drugs.
Yes, H. pylori infection is very common. It affects about half of the world's population, though many people never know they have it.
Anyone can get H. pylori, but it is more common in people living in crowded conditions or areas with poor sanitation. It often starts in childhood.
Symptoms
- Sudden, sharp stomach pain that does not go away
- Vomiting blood (looks like coffee grounds) or passing blood in stools (bright red or black, tarry)
- Feeling faint, dizzy, or weak along with stomach symptoms
- ⚠Stomach pain that gets worse or keeps coming back
- ⚠Unexplained weight loss
- ⚠Difficulty swallowing or pain when swallowing
- ⚠Persistent nausea or vomiting
Common symptoms
- Dull or burning pain in the upper stomach area (especially when your stomach is empty)
- Bloating or feeling uncomfortably full after eating
- Nausea or loss of appetite
- Burping a lot
- Unintentional weight loss
Symptoms in children
- Chronic stomach pain (often vague or dull)
- Nausea or vomiting
- Poor appetite and slow weight gain
- Anemia (pale skin, tiredness)
Symptoms in older adults
- Less noticeable stomach pain – may only feel mild discomfort or fullness
- Unexplained weight loss
- Anemia (low iron levels)
- Black or tarry stools (sign of bleeding ulcer)
Causes
Main causes
- Infection with the bacterium Helicobacter pylori, which enters the body through contaminated food, water, or close contact with someone carrying the germ.
Risk factors
- Living in crowded conditions or areas with poor sanitation
- Not having access to clean drinking water
- Living with someone who has H. pylori infection
- Being born or living in a developing country where the infection is more common
When to see a doctor
See a doctor urgently if:
- If you have severe stomach pain, vomit blood, or notice black/tarry stools – call emergency services right away.
- If you feel dizzy or faint along with stomach symptoms.
Book a routine appointment if:
- If you have ongoing stomach discomfort, bloating, or indigestion that doesn't go away after a few weeks.
- If you have a family history of stomach cancer or ulcers.
- If you are diagnosed with an ulcer and need testing to see if H. pylori is the cause.
Diagnosis
Your doctor may recommend one or more tests to check for H. pylori. The choice depends on your symptoms, medical history, and whether you have already had treatment.
Tests that may be done
- Stool antigen test – a sample of your stool is tested for signs of the bacteria.
- Urea breath test – you drink a special liquid, then breathe into a bag. The test checks for a substance the bacteria produce.
- Upper endoscopy with biopsy – a thin tube with a camera is passed down your throat to look at your stomach lining. Tiny samples (biopsies) are taken and tested for H. pylori. This is usually done if you have warning signs like bleeding or weight loss.
What to expect at your appointment
For the breath test or stool test, you will be asked to stop taking certain medicines (like antibiotics or acid reducers) for a week or two before the test. The tests are simple and don't hurt. The stool test involves providing a small sample. The breath test takes about 30 minutes. An endoscopy is done with sedation, so you won’t feel discomfort. Your doctor will explain everything beforehand.
Treatment
If you test positive for H. pylori, treatment is recommended to clear the infection and prevent complications. Treatment usually involves taking a combination of medicines for 7 to 14 days.
Self-care at home
- Take all your medicines exactly as your doctor prescribes – don't stop early even if you feel better.
- Avoid alcohol during treatment, as it can interfere with some medicines.
- Eat smaller, more frequent meals if you have stomach discomfort.
- Avoid very spicy or acidic foods if they worsen your symptoms.
Medical treatments
Treatment is typically a combination of two different antibiotics plus an acid-suppressing medication (called a proton pump inhibitor). Sometimes a medicine containing bismuth is also added. The exact combination and length of treatment depend on your health and local resistance patterns. Always finish the full course of antibiotics even if you feel well. Your doctor may want a follow-up test after treatment to confirm the infection is gone.
When is surgery considered?
Surgery is rarely needed for H. pylori infection itself. It may be considered if an ulcer causes a serious complication like a hole in the stomach wall or severe bleeding that cannot be stopped with medicine.
Living with this condition
While you have the infection or are undergoing treatment, you can still live a normal life. Most people feel better once the infection is cleared. Follow your doctor's advice and take your medicines as directed.
Lifestyle tips
- Wash your hands regularly, especially after using the bathroom and before eating.
- Drink clean, safe water and eat well-cooked food.
- Avoid sharing utensils, glasses, or toothbrushes with others when you are in treatment.
Diet and exercise
A balanced diet can help your stomach heal. Include foods like plain yogurt, bananas, oatmeal, and lean proteins. Avoid very spicy, fried, or acidic foods if they bother you. Stay well-hydrated. Gentle exercise like walking can help digestion, but listen to your body – avoid strenuous activity if you feel pain.
Mental health and emotional wellbeing
Having a stomach infection and its symptoms can be stressful. You might worry about the risk of ulcers or cancer. Remember that most infections are treated successfully and the risk of serious problems is low. Talk to your doctor if you feel anxious – they can provide reassurance and resources.
Prevention
It is not always possible to prevent H. pylori infection, because it is spread by contaminated food, water, and close contact. However, you can lower your risk by practicing good hygiene, drinking clean water, and thoroughly cooking food.
Screening programmes
Routine screening for H. pylori is not recommended for everyone. Your doctor may suggest testing if you have symptoms or certain risk factors. In some countries, testing is offered to people with a family history of stomach cancer.
Complications
If left untreated
- Stomach ulcers (sores in the stomach lining) that can cause bleeding or pain.
- Chronic inflammation of the stomach lining (gastritis).
- Increased risk of stomach cancer (though this is rare).
- Iron deficiency anemia from slow blood loss.
Long-term outlook
The outlook is very good. With the right treatment, more than 80% to 90% of people clear the infection. Ulcers heal once the bacteria are gone. Even if you have no symptoms, treatment reduces the long-term risk of complications. Follow your doctor’s advice and finish all your medications.
Find support
External links open third-party websites. Ruqelo Health is not responsible for external content. Listing an organisation does not imply endorsement.
Always verify with your doctor
Health guidelines vary by country and region. The information in this article is based on international clinical guidelines but may not reflect the specific guidelines, medications, or practices in your country. Always discuss your health concerns with your own doctor or healthcare provider, and refer to your local national health guidelines where available.
Important notice This information is for educational purposes only. It does not replace professional medical advice, diagnosis, or treatment. Always consult a qualified healthcare provider about your specific situation. If you are experiencing a medical emergency, call your local emergency services immediately.
Related conditions
Sources and guidance
This article is educational and is prepared with reference to recognized health information and clinical guidance sources where available. Specific source links may vary by topic.
Last updated: July 16, 2026
Educational note: This information is for education only and is not a diagnosis.
Use it to support, not replace, advice from a licensed clinician.
If symptoms are severe, worsening, or urgent, call your local emergency number or seek emergency care.
Guidance may differ by country or region. Confirm local recommendations with a qualified healthcare provider.