Digestive health
H. pylori: symptoms, tests and treatment for Helicobacter pylori infection
Helicobacter pylori (H. pylori) are bacteria that live in the stomach lining. Infection is common and often causes no symptoms, but it is a main cause of stomach ulcers. NICE says it is found by a breath, stool or blood test, and treated with a proton pump inhibitor plus a combination of antibiotics for 7 days.
Last checked: 2026-10-11
Key facts
At a glance.
-
What it is
NICE says H pylori are bacteria that live in your stomach, and the infection can cause stomach ulcers which in turn can cause the symptoms of indigestion.
-
Often silent
NHS inform says infections are common, you can be infected without realising it because it does not usually cause symptoms, and people of all ages can be infected.
-
Symptoms of an ulcer
The NHS says the main symptom of a stomach ulcer is tummy pain, usually in the upper tummy, which may feel like burning and is often worse at night, with indigestion, heartburn, bloating and feeling or being sick.
-
Tests
NICE says H pylori infection is often detected using a breath test or a stool test, or sometimes a blood test.
-
Treatment
NICE says treatment involves taking a PPI as well as a combination of antibiotics for 7 days. If you still have symptoms you might need a second course.
-
Retesting
The NHS says you may need tests after treatment to make sure it has worked. If symptoms come back, speak to a GP.
-
Main causes of ulcers
The NHS says the main causes of stomach ulcers are H pylori infection and regular use of anti-inflammatory painkillers (NSAIDs) such as ibuprofen.
-
Emergency signs
The NHS says to call 999 or go to A&E if you vomit bright red blood or vomit that looks like ground coffee, pass black, sticky, smelly poo, have severe tummy pain, or have sudden chest pain.
What are the symptoms of H. pylori?
H. pylori infection itself often causes no symptoms. NHS inform says it is possible to be infected without realising because the infection does not usually cause symptoms. When symptoms do occur, they are usually those of a stomach ulcer or indigestion, which is how most people come to be tested.
The NHS says the main symptom of a stomach ulcer is tummy pain that is usually in the upper part of the tummy, may feel like burning, and is often worse at night. Other symptoms include indigestion, heartburn (a burning sensation in the chest), bloating and feeling or being sick. NHS inform adds that not all stomach ulcers are painful and some are only noticed when a complication such as bleeding develops.
When to see a GP or get urgent help
The NHS says to see a GP if you have indigestion that does not go away with treatment or your tummy pain keeps coming back.
It says to ask for an urgent GP appointment or get help from NHS 111 if you have symptoms of a stomach ulcer and your tummy pain is getting worse or does not go away, you have lost your appetite, feel full after a very small amount of food, have lost weight without trying, feel a lump in your tummy, find it painful or difficult to swallow, keep being sick, or feel tired all the time.
Call 999 or go to A&E if you are vomiting bright red blood or your vomit looks like ground coffee, your poo has blood in it or is black, sticky and very smelly, you have severe tummy pain, it is painful to touch your tummy, or you have chest pain that started suddenly. The NHS says not to drive yourself to A&E.
How is H. pylori treated?
NICE says that if you have H pylori your doctor should offer you a course of treatment to get rid of the infection. The treatment involves taking a proton pump inhibitor (PPI) as well as a combination of antibiotics for 7 days. Your doctor will take into account the antibiotics you have been prescribed in the past and whether you are allergic to penicillin.
If you still have symptoms after treatment you might need a second course. NICE says that if you have had 2 courses and still have the infection, your doctor should get expert advice from a specialist such as a gastroenterologist. It also stresses how important it is to take the medicines correctly, at the times and doses prescribed.
For a stomach ulcer, the NHS says treatment depends on the cause: antibiotics to treat H pylori infection, and medicines to reduce stomach acid such as proton pump inhibitors. Treatment usually lasts from 1 week to 2 months depending on the cause, and you may need tests afterwards to make sure it has worked. NHS inform says most stomach ulcers take a few months to heal after treatment.
How is H. pylori diagnosed?
NICE says H pylori infection is often detected using a breath test or a stool test, or sometimes a blood test, and that your GP should explain what is involved and whether you should stop taking any medication before the test. The NHS says the tests a GP may arrange include a breath test (a tablet or special drink and then breathing into a tube), a test of a stool sample and a blood test, and that you may be referred for a gastroscopy.
NHS Borders' clinical guidance (a Scottish toolkit for clinicians) notes practical points about timing: a stool antigen test should not be performed within at least 2 weeks of taking proton pump inhibitors or 4 weeks of antibiotics, as these can suppress the bacteria and lead to false negatives. That is why your GP may ask you to pause some medicines before testing; do not stop anything unless you are told to.
| Test | How it works |
|---|---|
| Urea breath test | You are given a special drink containing a chemical that is broken down by H pylori, and your breath is then analysed. |
| Stool antigen test | A small stool sample is tested for the bacteria. |
| Blood test | A blood sample is tested for antibodies to the bacteria. NHS inform says it has now largely been replaced by the stool antigen test. |
| Gastroscopy | A thin, flexible tube with a camera is passed through the mouth into the stomach to look for an ulcer. It is used in some cases. |
What is H. pylori and what does it do?
NICE says H pylori are bacteria that live in your stomach, and NHS inform says they live in the stomach lining, where they can irritate it and make it more vulnerable to damage from stomach acid. The infection can cause stomach ulcers.
NHS inform says it is not clear exactly why some people are more vulnerable to the effects of H. pylori than others. The NHS also lists an increased risk of stomach cancer from an untreated H pylori infection as a possible complication of a stomach ulcer.
The pages used for this guide do not set out how H. pylori passes from person to person, so this guide does not make claims about that. Your GP can answer questions about whether household members need testing.
What causes stomach ulcers, and is H. pylori the only cause?
No. The NHS says the main causes of stomach ulcers are infection with H pylori bacteria and regular use of anti-inflammatory painkillers (NSAIDs) such as ibuprofen. Stomach ulcers are also more common in people who smoke, and the risk increases as you get older.
NHS inform says there is little evidence that spicy foods, stress or alcohol cause stomach ulcers, but they can make symptoms worse, and smoking can increase your risk and make treatment less effective.
Diet and what you can do yourself
There is no special diet that treats H. pylori; treatment is medicines. The NHS suggests that after seeing a GP you can help ease stomach ulcer symptoms and reduce the risk of recurrence in several ways:
-
Eat smaller meals.
-
Eat your evening meal 3 to 4 hours before going to bed.
-
Try to keep to a healthy weight and take steps to manage stress.
-
Do not take anti-inflammatory painkillers such as ibuprofen without speaking to a doctor first.
-
Avoid food or drink that triggers your symptoms, which can include fatty or spicy foods, coffee and chocolate.
-
Do not smoke and do not drink too much alcohol.
Complications if it is not treated
The NHS says it is important to get treatment for a stomach ulcer because, if it is not treated, it can lead to serious problems that may be life-threatening: bleeding from the stomach or intestine, a lack of iron (iron deficiency anaemia) caused by bleeding, a hole in the stomach that can cause peritonitis (a serious infection of the lining of the tummy), and an increased risk of stomach cancer from an untreated H pylori infection.
NHS Borders' guidance adds that effective eradication will prevent the recurrence of duodenal and gastric ulcers in more than 85% of patients. This figure comes from a Scottish health board's clinical guidance for professionals.
NHS and private pathways
On the NHS, H. pylori is usually found when a GP investigates indigestion or a suspected ulcer. Testing is by breath, stool or blood test, and treatment is a short course of antibiotics with a PPI. You may be referred for a gastroscopy if symptoms need further investigation.
Private gastroenterology clinics and some pharmacies also offer H. pylori testing. If you pay for a test, tell your GP the result so your records are complete and treatment and retesting follow the same rules.
Frequently asked
Questions people ask.
Quick, plain-English answers to the questions we hear most.
-
What is H. pylori?
NICE says H pylori are bacteria that live in your stomach. The infection can cause stomach ulcers, which in turn can cause the symptoms of indigestion. NHS inform says infections are common and people of all ages can be infected.
-
What are the symptoms of H. pylori?
Often none. NHS inform says it is possible to be infected without realising. The NHS says a stomach ulcer causes upper tummy pain that may feel like burning, with indigestion, heartburn, bloating and feeling or being sick.
-
How is H. pylori diagnosed?
NICE says it is often detected using a breath test or a stool test, or sometimes a blood test. NHS inform says some people are referred for a gastroscopy to look for an ulcer.
-
How is H. pylori treated?
NICE says treatment involves taking a PPI as well as a combination of antibiotics for 7 days. Your doctor takes into account antibiotics you have had before and whether you are allergic to penicillin. A second course may be needed.
-
What if the treatment does not work?
NICE says that if you have had 2 courses of H pylori treatment and still have the infection, your doctor should get expert advice from a specialist such as a gastroenterologist.
-
Do I need a test after treatment?
The NHS says you may need tests after treatment to make sure it has worked. If your symptoms come back after treatment, speak to a GP, who may try a different medicine or ask you to take medicine for longer.
-
Is H. pylori contagious?
The pages used for this guide do not describe how H. pylori passes between people, so we cannot give a sourced answer here. NHS inform says infections are common and people of all ages can be infected. Ask your GP if you are concerned about household contacts.
-
How long does H. pylori treatment last?
NICE says the antibiotic and PPI course is 7 days. The NHS says treatment for a stomach ulcer usually lasts from 1 week to 2 months depending on its cause, and NHS inform says most ulcers take a few months to heal.
-
Can H. pylori cause stomach cancer?
The NHS lists an increased risk of stomach cancer from an untreated H pylori infection as a possible complication of a stomach ulcer. That is one reason it recommends getting treatment for a stomach ulcer.
-
Does what I eat make a difference?
Diet does not clear H. pylori; medicines do. NHS inform says there is little evidence that spicy food, stress or alcohol cause stomach ulcers, but they can make symptoms worse, and the NHS suggests avoiding foods that trigger your symptoms.
Where this comes from
Sources and checking.
This guide is for information, not medical advice.
Your GP or consultant knows your history and can tell you which parts apply to you. If your symptoms are severe, rapidly worsening, or come with red-flag features, seek urgent medical care. Figures and availability change, so treat them as a guide and confirm with the provider.
Published 2026-10-11, next review 2027-10-11.
-
NICE: Information about Helicobacter pylori (CG184 information for the public), https://www.nice.org.uk/guidance/cg184/ifp/chapter/information-about-helicobacter-pylori , retrieved October 2026
-
NHS: Stomach ulcer, https://www.nhs.uk/conditions/stomach-ulcer/ , retrieved October 2026
-
NHS inform: Stomach ulcer, https://www.nhsinform.scot/illnesses-and-conditions/stomach-liver-and-gastrointestinal-tract/stomach-ulcer/ , retrieved October 2026
-
NHS Borders (Right Decisions): Helicobacter pylori, https://www.rightdecisions.scot.nhs.uk/borders-ref-help-toolkit/gastroenterology/helicobacter-pylori/ , retrieved October 2026
Related guides
Keep reading.
-
H. pylori infection
More on the infection itself.
Read guide -
Peptic ulcer
Stomach and duodenal ulcers.
Read guide -
Dyspepsia
Indigestion and upper tummy discomfort.
Read guide -
Gastritis
Inflammation of the stomach lining.
Read guide -
Acid reflux
A common look-alike for ulcer symptoms.
Read guide -
H. pylori breath test versus gastroscopy
Comparing the two tests.
Read guide -
Gastroscopy
The camera test of the stomach.
Read guide