H. pylori Infection: Symptoms, Causes, Diagnosis, and Treatment

Medically Reviewed by Jabeen Begum, MD on September 27, 2023
8 min read

Helicobacter pylori (H. pylori) is a type of bacteria that infects your stomach. It can cause sores and inflammation in the lining of your stomach or the upper part of your small intestine (the duodenum). For some people, an infection can lead to stomach cancer.

Infection with H. pylori is common. About two-thirds of the world’s population has it in their bodies. For most people, it never causes any symptoms. But it's the most common cause of peptic ulcers, which are painful open sores in your digestive tract. In rare cases, it could even lead to stomach cancer.

 

H. pylori bacteria usually spread from person to person and also likely through:

  • Dirty food, water, or utensils
  • Mouth to mouth (kissing)
  • Contaminated poop or vomit

Once H. pylori enters your body, it multiplies in the lining of your stomach. This weakens the lining, making it more likely that your stomach acids will cause an ulcer.

Is H. pylori contagious?

Yes. You can get H. pylori if you have contact with the saliva or other body fluids of someone who is already infected. 

 

Most people get H. pylori during childhood, but adults can get it, too. Infections are often related to your living conditions.

Risk factors include:

  • Crowded living conditions
  • Lack of clean water and sewer service
  • Living in close quarters with someone who is infected 
  • Living in a developing country

 

Just having the bacteria doesn't cause symptoms. But you'll probably notice them if you get stomach inflammation (gastritis) or a peptic ulcer due to H pylori. The most common issue is a dull or burning pain in your belly. The feeling may come and go, and may worsen when your stomach is empty. You may feel better after you eat, drink milk, or take an antacid.

Other symptoms include:

What does H. pylori poop look like?

Most people infected with H. pylori will have normal-looking poop. But if yours looks dark, black, tarry, or has any blood in it, call your doctor right away. 

 

Sometimes, peptic ulcers bleed into your stomach or intestines. This can be dangerous. Call your doctor right away if you have any of these symptoms:

An H. pylori infection is also a risk factor for stomach cancer, which has few symptoms at first. Call your doctor if you have any of these signs:

  • Belly pain or swelling
  • Bloating
  • Nausea
  • Loss of appetite
  • Feeling full after you eat just a small amount
  • Vomiting
  • Weight loss for no reason
  • Black poop

Depending on your symptoms, your doctor will likely ask you about your medical history and any medicines you take. Then they’ll give you a physical exam, which may include checking your belly for swelling, tenderness, or pain. 

H. pylori tests

There are several tests your doctor can use to find out if you're infected with H. pylori, including: 

Stool tests

  • Stool antigen tests detect proteins (antigens) related to H. pylori in your poop. They're the most common tests used to find the bacteria.
  • Stool PCR tests (polymerase chain reaction tests) look for H. pylori in your poop. They also look for mutations that can make the bacteria antibiotic-resistant. PCR tests are more expensive than antigen tests and may not be as easy to get. 

Urea breath test 

During this test, you exhale into a bag so your doctor can measure how much carbon dioxide is in your breath. Then you swallow a liquid or pudding that contains a substance called urea. Several minutes later, you'll exhale into a different bag to measure your carbon dioxide again.

The two bags are sent to a lab for comparison. If you have H. pylori in your gut, it will break down the urea in the liquid you swallowed, and carbon dioxide will be released in your breath. If there's more carbon dioxide in the second sample than the first, your test is positive for H. pylori.

To look more closely at your ulcers, your doctor may use:

  • Upper gastrointestinal endoscopy. Your doctor uses a tube with a small camera, called an endoscope, to look down your throat and into your stomach and the upper part of your small intestine. The procedure may also be used to collect a sample that will be checked for H. pylori. You may be asleep or awake during the procedure, but you’ll get medicine to make you more comfortable.
  • Upper GI tests. In a hospital, you’ll drink a chalky white liquid that contains a substance called barium, and your doctor will give you an X-ray. The barium coats your throat and stomach and makes them stand out clearly on the image.
  • Computed tomography (CT) scan. This powerful X-ray can be used to detect stomach conditions like peptic ulcers. 

Ulcers caused by H. pylori are usually treated with a combination of antibiotics and a proton pump inhibitor (PPI).

Triple therapy for H. pylori

There are two common types of these three-medication treatments:

  • Rifabutin-based triple therapy, which includes two antibiotics (amoxicillin and rifabutin) and a PPI (omeprazole) that you take together every 8 hours for 14 days. This triple therapy is available as one pill, approved by the FDA in 2019 under the brand name Talicia. 
  • Clarithromycin triple therapy also has two antibiotics (clarithromycin and amoxicillin or metronidazole) plus a PPI. This is usually an option in cases where the H. pylori strain has low resistance to clarithromycin.

If any of your medications bother you, talk to your doctor about your treatment options and how you can handle side effects.

Most ulcers caused by H. pylori will heal after a few weeks. Don't take nonsteroidal anti-inflammatory drugs (NSAIDs) like aspirin, ibuprofen, and naproxen for pain, since they can damage your stomach lining. If you need pain medicine, talk to your doctor.

Your doctor may retest you for H. pylori about 4 weeks after you finish your treatment. If you still show signs of an infection, you might need to take another round of different antibiotics.

H. pylori commonly causes inflammation to the lining of your stomach (gastritis). You don't always have symptoms from gastritis, but the irritation and swelling it causes can lead to discomfort, nausea, and vomiting.  

Peptic ulcers are the most common complication of H. pylori. About 10% of those infected with the bacteria will get one. A serious one could:

  • Block digested food from leaving your stomach
  • Leave a hole in the wall of your stomach
  • Cause bleeding

It’s not common, but an untreated long-term H. pylori infection is a risk factor for some types of stomach cancer. The disease has few symptoms at first, such as heartburn. Over time, you may notice:

  • Belly pain or swelling
  • Nausea
  • Not feeling hungry
  • Feeling full after you eat just a small amount
  • Vomiting
  • Weight loss for no reason

Call your doctor if you show any of these signs.

If you have a history of stomach cancer in your family, your doctor may recommend testing for H. pylori.

You can protect yourself from getting an H. pylori infection the same ways you keep other germs at bay:

  • Wash your hands thoroughly after you use the bathroom and before you prepare or eat food. Teach your children to do the same.
  • Avoid eating food or drinking water that’s not clean.
  • Don’t eat anything that isn’t cooked thoroughly.
  • Avoid food served by people who haven’t washed their hands.

H. pylori diet

While the main risk factors for H. pylori infection are poor sanitation and hygiene practices, research shows that what you eat also may play a role. One study found that people whose diets were high in fresh fruits and vegetables, whole grains, nuts, and seeds had lower risks of H. pylori infection. But those whose diets were full of carbohydrates, processed grains and meats, sugars, and salt were more likely to have H. pylori infections. 

This could be because some compounds like vitamin C, polyphenols, and flavonoids in the first group's diet help protect the stomach lining and prevent the bacteria from establishing. But we need more research to know for sure.

H. pylori is a common type of bacteria that attacks the stomach lining. It's usually passed from person to person. Most infections are harmless. But the bacteria is to blame for most peptic stomach ulcers, and if it's not treated, it could be a risk factor for stomach cancer. The most effective treatments include a combination of antibiotics and proton pump inhibitors.

  • Is H. pylori a serious infection?

Most people infected with H. pylori don't have any problems. But the bacteria can do serious damage to your stomach lining and is the leading cause of peptic ulcers. In rare cases, it can lead to stomach cancer.

  • Can H. pylori be easily cured?

You can treat the symptoms of an H. pylori infection with antibiotics, proton pump inhibitors (PPIs), and H-2 blockers. Treatment takes about 2 weeks. Once the bacteria are gone, there's little chance the infection will return if you follow good hygiene practices.