Helicobacter pylori (H. pylori) infection

Overview

A Helicobacter pylori infection is a common stomach infection. It's caused by a germ called Helicobacter pylori, a bacteria also known as H. pylori.

More than half the people in the world may have an H. pylori infection at some point in their lives. These infections often happen during childhood, especially in developing countries. H. pylori germs seem to spread through contact with an infected person's bodily fluids, including vomit, stool or saliva. This includes contact that happens through poor hand hygiene. The germs also can spread through tainted food and water.

H. pylori infections can cause stomach pain, bloating, gas and other symptoms. But most people who become infected don't have symptoms. Sometimes, H. pylori infections lead to sores called peptic ulcers in the lining of the stomach or small intestine. Much less often, these infections can lead to stomach cancer.

Your healthcare professional likely will test you for an H. pylori infection if you get symptoms of a peptic ulcer. Treatment for the infection includes medicines called antibiotics to clear up the bacteria.

Help prevent an H. pylori infection by not sharing food or utensils.

Symptoms

Most H. pylori infections don't cause symptoms. When a person gets symptoms, they often come from swelling of the stomach lining or a peptic ulcer. The symptoms can include:

  • An ache or burning pain in the stomach area, also called the abdomen.
  • Stomach pain that may feel worse when the stomach is empty.
  • Upset stomach.
  • Loss of appetite.
  • Frequent burping.
  • Bloating.
  • Weight loss.

When to see a doctor

Make an appointment with your healthcare professional if you have ongoing stomach pain or other stomach symptoms. Get medical help right away for:

  • Sharp, sudden or very bad stomach pain that doesn't get better.
  • Bloody or black, tarry stools.
  • Bloody or black vomit or vomit that looks like coffee grounds.
  • Trouble swallowing.
  • Unusual tiredness, dizziness or passing out.

Causes

H. pylori infections are caused by H. pylori germs that get into the stomach lining. The germs appear to be passed from person to person through contact with saliva, vomit or stool. They also may be spread through contaminated surfaces, or tainted food or water.

Risk factors

Risk factors for H. pylori infections include your living conditions, health history and eating habits. These risk factors include:

  • Living in crowded conditions. Living in a home with many other people can raise your risk of an H. pylori infection.
  • Lacking a reliable supply of clean water. H. pylori germs can spread through tainted water that hasn't been treated enough for safety.
  • Living in a developing country. H. pylori infections are more common in developing nations, where clean water and living conditions may be harder to access. In developing countries, these infections are more common during childhood.
  • Having certain health conditions. Ongoing swelling and thinning of the stomach lining called atrophic gastritis can raise the risk of an H. pylori infection. So can an immune system condition called pernicious anemia and tumors of the stomach that aren't cancer called gastric adenomas.
  • Having a family history of certain conditions. Your risk of an H. pylori infection rises if a parent or sibling has had peptic ulcers or stomach cancer.
  • Sharing food or utensils. H. pylori germs can spread through saliva. So don't share food or silverware with family members or friends.

Complications

An H. pylori infection can lead to other health conditions called complications. These can include:

  • Ulcers. H. pylori can damage the protective lining of the stomach and small intestine. This lets stomach acid create an open sore called an ulcer. About 10% to 15% of people with H. pylori get an ulcer.
  • Swelling, also called inflammation, of the stomach lining. H. pylori infections can affect the stomach, causing irritation and swelling called gastritis.
  • Stomach cancer. H. pylori infection is a strong risk factor for certain types of stomach cancer. But only a small number of people with H. pylori infections go on to get stomach cancer. Limiting salt and pickled foods may help lower the risk of cancer if you have an H. pylori infection.
Illustration showing ulcers

Prevention

You may be able to help prevent an H. pylori infection by not sharing food or utensils with family or friends.

Diagnosis

Diagnosis of an H. pylori infection involves testing to find out if your symptoms are caused by H. pylori germs. Your healthcare professional may recommend one or more of the following tests:

Stool tests

A lab checks a sample of your stool for signs of H. pylori germs. These tests include:

  • Stool antigen test. This common stool test looks for proteins called antigens related with H. pylori infections.
  • Stool PCR test. A polymerase chain reaction (PCR) test also can find an H. pylori infection in stool. The test can find gene changes that may be resistant to antibiotic medicines used to treat H. pylori infections. However, this test is more expensive than a stool antigen test and may not be available at all medical centers.

Breath test

You might hear this called a urea breath test. During the test, you swallow a pill, liquid or pudding that contains tagged carbon molecules in a substance called urea. If you have an H. pylori infection, carbon is released when the solution makes contact with the germs. This breaks down the urea, releasing the carbon.

Because your body absorbs the carbon, it is released when you breathe out. To measure the release of carbon, you blow into a bag. A device detects the carbon molecules to find out if more are released after taking the substance that contains urea. This test can be used for adults and children older than 6 who can follow along with the test instructions.

Scope test

This test checks your upper digestive system. It's also called an upper endoscopy exam. Your healthcare professional may recommend it to check on symptoms that may be caused by a peptic ulcer or gastritis. These and certain other conditions can stem from H. pylori infections.

For this exam, you're given medicine to help you relax. Then, your healthcare professional threads a camera attached to a long, flexible tube down your throat and esophagus. This tool is called an endoscope.

The endoscope goes into your stomach and the first part of the intestine, called the duodenum. It lets your healthcare professional view any issues in your upper digestive tract. Your healthcare professional also might use the endoscope to take tissue samples. This is called a biopsy. These samples are checked by a lab for an H. pylori infection.

An upper endoscopy is more invasive than a breath or stool test. So it's often not used to diagnose an H. pylori infection alone. Healthcare professionals may use an upper endoscopy for further testing and to look for other digestive conditions. They also can use this test to figure out exactly which antibiotic is best to treat H. pylori infection, especially if the first antibiotics tried didn't get rid of the infection.

This test may need to be done again after treatment for an H. pylori infection. It depends on what is found at the first endoscopy or if your symptoms continue after treatment.

Testing considerations

The same tests used for diagnosis can be used to tell if the H. pylori infection is gone after treatment. In general, you wait at least four weeks after you finish your antibiotic treatment to get these follow-up tests.

If your treatment includes certain other medicines, you'll also need to wait up to two weeks before follow-up testing. These medicines can affect the accuracy of the test results and include:

  • Medicine that can be used for ulcer treatment called bismuth subsalicylate (Pepto-Bismol).
  • Medicines to lessen stomach acid called proton pump inhibitors and histamine (H-2) blockers.

Your healthcare professional gives you specific instructions about your medicines.

The role of screening tests

In places where H. pylori infections and their complications are common, healthcare professionals sometimes test healthy people for H. pylori. This is called screening. Whether there is a benefit to this testing when you have no symptoms of infection is controversial among experts.

If you're concerned about an H. pylori infection, talk with your healthcare professional. Together you can decide whether H. pylori testing might be right for you. For example, your healthcare professional may recommend screening if you have a high risk of stomach cancer. Treatment may lower the chances that a stomach ulcer caused by an H. pylori infection becomes cancerous.

Treatment

Treatment for H. pylori infections usually involve taking at least two different antibiotics at once. This helps prevent the germs from resisting the effects of one particular antibiotic.

Treatment also may include medicine to help your stomach heal, such as:

  • Proton pump inhibitors (PPIs). These medicines stop acid from being made in the stomach. Some examples of PPIs are omeprazole (Prilosec), esomeprazole (Nexium), lansoprazole (Prevacid) and pantoprazole (Protonix).
  • Bismuth subsalicylate. This medicine works by coating an ulcer and protecting it from stomach acid.
  • Histamine (H-2) blockers. These medicines block a substance called histamine, which triggers the stomach to make acid. One example is cimetidine (Tagamet HB). H-2 blockers are prescribed for H. pylori infection only if PPIs can't be used.

Follow-up testing for H. pylori at least four weeks after your treatment is recommended. If the tests show that the treatment didn't work, you may need more treatment with a different mix of antibiotics.

Preparing for your appointment

See your healthcare professional if you have symptoms of an H. pylori infection. Your healthcare team may test and treat you for H. pylori infection. Or you might be referred to a healthcare professional called a gastroenterologist, who treats diseases of the digestive system.

Here's some information to help you get ready for your healthcare appointment, and what to expect.

What you can do

At the time you make the appointment, ask if there's anything you need to do in advance. For example, you might be told to restrict your diet.

Also, preparing a list of questions to ask may help you make the most of your time with your healthcare professional. Questions to ask include:

  • How did an H. pylori infection cause the complications I'm having?
  • Can an H. pylori infection cause other complications?
  • What kinds of tests do I need?
  • Do I need to do anything to prepare for these tests?
  • What treatments are available?
  • What treatments do you recommend?
  • How will I know if the treatment worked?

Feel free to ask any other questions during your appointment.

What to expect from your doctor

Your healthcare professional is likely to ask you questions such as:

  • Have your symptoms been constant, or do they come and go?
  • How serious are your symptoms?
  • When did your symptoms start?
  • Does anything make them better or worse?
  • Have your parents or siblings ever had similar symptoms?
  • What medicines or supplements do you take regularly?
  • Do you take any pain relievers such as aspirin, ibuprofen (Advil, Motrin IB, others) or naproxen sodium (Aleve)?

Be ready to provide information and answer questions. It may give you more time to cover other points you want to talk about with your healthcare team.


Content From Mayo Clinic Updated: 06/13/2025
© 1998-2025 Mayo Foundation for Medical Education and Research (MFMER). All rights reserved. Terms of Use