How Do You Get H. Pylori? Causes and Risk Factors

H. pylori spreads primarily through direct contact with an infected person’s saliva, vomit, or stool. About 44% of adults worldwide carry the bacteria, and most pick it up during childhood, typically before age 10. The infection passes between people in close quarters, through contaminated water, and occasionally through food.

Person-to-Person Spread

The three established transmission routes are fecal-oral (touching contaminated stool and then your mouth), oral-oral (through saliva), and gastric-oral (through vomit). Of these, exposure to vomit from an infected person carries the highest risk. A CDC study of household transmission found that being around an infected family member who was vomiting increased the odds of new infection more than sixfold. Diarrhea from an infected person raised the risk as well, though less dramatically. Overall, 75% of new infections in the study were traced back to exposure to a sick household member.

This is why the bacteria spreads so efficiently within families. Parents pass it to children through shared utensils, close facial contact, or caring for a child during a stomach illness. The bacterium has been isolated from saliva, dental plaque, vomit, and stool, though it’s recovered most reliably from vomit and from stool during bouts of diarrhea, when the gut is moving contents through quickly.

Contaminated Water and Food

H. pylori can also behave like a waterborne pathogen. In regions where water treatment is limited or sanitation infrastructure is poor, contaminated drinking water is a significant source of exposure. Food that has been washed in contaminated water or handled by an infected person can carry the bacteria as well. This route is more relevant in low- and middle-income countries, but it can occur anywhere food safety practices break down.

Why Children Are Most Vulnerable

A long-term study published in The Lancet followed people from infancy into adulthood and found that the rate of new H. pylori infections was highest in early childhood: about 2.1% per year at ages 4 to 5, dropping to 1.5% at ages 7 to 9, and falling to just 0.3% per year by the early twenties. The median age of infection was 7.5 years. Most people who carry H. pylori acquired it as young children, and if you reach adulthood without it, your chances of picking it up are relatively low.

Children are more susceptible partly because of behavior (less consistent handwashing, sharing food, putting objects in their mouths) and partly because of biology. Their immune systems and stomach environments are still developing, which may make initial colonization easier.

Crowded Living Conditions Raise Risk

The single clearest environmental risk factor is household overcrowding. A large meta-analysis found that living in crowded conditions raised the odds of H. pylori infection by about 38%. Bed sharing between children, large family sizes, and limited personal space all increase the frequency of the kind of close contact that spreads the bacterium. Occupational instability, a marker of lower socioeconomic status, also showed a statistically significant link to higher infection rates.

Interestingly, the association between general “hygiene conditions” and infection was not statistically significant across studies, likely because hygiene is hard to measure consistently. The specific behaviors that matter most, like handwashing after using the toilet and before preparing food, are more predictive than broad hygiene scores. The same pattern holds for drinking water quality: unimproved water sources showed a trend toward higher infection rates, but the data varied too much across regions to reach statistical significance overall.

How the Bacteria Survives Your Stomach

Your stomach is one of the most hostile environments in the body, with a pH low enough to destroy most bacteria. H. pylori has a remarkable workaround. It produces an enzyme that breaks down urea (a natural compound in your stomach) into ammonia, which raises the pH in its immediate surroundings. This serves a dual purpose: it protects the bacterium from acid, and it physically changes the consistency of the stomach’s mucus lining.

Stomach mucus normally forms a thick, gel-like barrier at low pH. When H. pylori raises the local pH, that gel liquefies into a watery solution the bacterium can swim through freely. Research from PNAS showed that H. pylori doesn’t bore through mucus like a corkscrew, as scientists once thought. Instead, it essentially melts its path by chemically transforming the gel around it. Once it reaches the stomach wall beneath the mucus, it can establish a long-term colony that the immune system struggles to clear.

What H. Pylori Can Lead To

Most people with H. pylori never develop symptoms. But chronic infection is the primary cause of peptic ulcers (sores in the stomach or upper intestine) and is directly linked to stomach cancer. The National Cancer Institute notes that the majority of gastric adenocarcinoma cases, the most common type of stomach cancer, are attributed to H. pylori. Nearly all patients with gastric MALT lymphoma, a rarer cancer of the stomach’s immune tissue, show signs of H. pylori infection.

The progression from infection to cancer takes decades and involves a slow cascade of inflammation and cellular changes. This is why infection in childhood is particularly consequential: it gives the bacteria the longest possible window to cause damage.

Reducing Your Risk

Because H. pylori spreads through the same routes as other gut infections, the prevention strategies are familiar. Wash your hands thoroughly after using the bathroom and before handling food. If someone in your household is vomiting or has diarrhea, clean contaminated surfaces promptly and avoid sharing towels, utensils, or cups. In areas where tap water quality is uncertain, use bottled or boiled water for drinking and food preparation.

For families with young children, the most practical step is consistent hand hygiene at the moments that matter: before meals, after diaper changes, and after using the toilet. There is no vaccine for H. pylori, so these basic precautions remain the primary line of defense. If you’re in a region with high prevalence or have a family history of stomach ulcers or stomach cancer, testing is straightforward and typically involves a breath test or stool sample.