What Causes H. Pylori? Transmission and Risk Factors

H. pylori infection is caused by a spiral-shaped bacterium called Helicobacter pylori that spreads primarily from person to person, most often during childhood. Roughly half of all adults worldwide carry the bacterium, and the vast majority picked it up before age 10. The infection doesn’t come from something your body produces on its own. It enters from an outside source, takes hold in the stomach lining, and can persist for decades if untreated.

How H. Pylori Spreads Between People

The bacterium travels through three main routes: from stool to mouth (fecal-oral), from mouth to mouth (oral-oral), and from vomit to mouth (gastric-oral). Of these, exposure to vomit from an infected person appears to be the single biggest driver. A CDC study of household transmission found that vomiting from an infected family member increased the risk of new infection more than sixfold. Over half of all new infections in the study were linked to exposure to vomit during a stomach illness, and more than 70% of the clearest cases traced back to that single event.

Oral-oral spread also plays a role. The bacterium has been isolated from saliva and dental plaque, which means sharing utensils, pre-chewing food for children, or close family contact can transmit it. Fecal-oral transmission happens when traces of infected stool contaminate hands, surfaces, or water supplies, following the same pattern as other gut infections.

Water, Food, and Environmental Sources

H. pylori doesn’t only live in the human stomach. It survives in contaminated water and on certain foods, particularly in regions where water treatment is inconsistent. A large review of studies in Iran found the bacterium present in about 11% of tested water, vegetable, and animal food samples. The most common scenario is water or produce contaminated with infected feces, which then introduces the bacterium to someone who drinks or eats without the contamination being obvious.

Unimproved drinking water sources (wells, untreated surface water) carry a roughly 35% higher risk of infection compared to treated municipal water, though the association is not as strong as direct person-to-person contact. For most people in developed countries, contaminated water is a less common route than household spread, but in lower-income settings it can be a major factor.

Why Childhood Is the Critical Window

Most people who carry H. pylori acquired it as young children, not as adults. A long-term study published in The Lancet that followed children from infancy into adulthood found the median age of infection was 7.5 years. The yearly rate of new infection was highest between ages 4 and 9 (around 1.5 to 2.1% per year) and dropped sharply by early adulthood to just 0.3% per year.

Children are more vulnerable for straightforward reasons: they put objects in their mouths, they have more physical contact with caregivers who may be infected, and their immune systems are still developing. By age 1 to 3, about 8% of children in the study already tested positive. The infection rate was more than three times higher among Black children than white children in the same cohort, a disparity that likely reflects differences in household density and socioeconomic conditions rather than biology.

Living Conditions That Raise Your Risk

H. pylori is not equally distributed across populations. Crowded households are one of the strongest and most consistent risk factors. A 2025 meta-analysis in Frontiers in Public Health found that household overcrowding raised the odds of infection by 38%. This makes intuitive sense: more people sharing bathrooms, kitchens, and sleeping spaces means more opportunities for the bacterium to pass from one person to another, especially when a family member gets a stomach bug.

Occupational instability, a marker of lower income and potentially less stable housing, was also linked to a 23% increased risk. Other factors like low education level, poor sanitation, and lower socioeconomic status all pointed in the same direction, though individually none reached the threshold of statistical significance. The overall picture is clear: conditions that increase close contact and reduce access to clean water and sanitation drive higher infection rates. This is why prevalence in some regions of Africa and South America exceeds 70%, while in Northern Europe and North America it hovers closer to 30 to 40%.

How the Bacterium Survives in Your Stomach

Your stomach is one of the most hostile environments in the body, with acid strong enough to break down food. H. pylori survives this by producing an enzyme that splits urea (a natural compound in stomach fluid) into ammonia and carbon dioxide. The ammonia neutralizes the acid in the bacterium’s immediate surroundings, creating a small protective bubble. In lab conditions, this process can raise the local pH from a highly acidic 3.5 to a mildly alkaline 8.45, essentially flipping the chemistry of the area around the bacterium from corrosive to comfortable.

Once it has neutralized the acid, H. pylori burrows into the thick mucus layer that coats your stomach wall. It uses its spiral shape and whip-like tails to swim through the mucus and attach to the cells beneath. There, shielded from both acid and the bulk of your immune response, it can persist for years or even a lifetime. The ongoing inflammation it triggers is what eventually leads to ulcers, chronic gastritis, and in a small percentage of cases, stomach cancer.

Can You Get It From Pets?

This is an area of genuine scientific uncertainty. Dogs and cats naturally carry their own Helicobacter species, and some of those strains have been found in humans with stomach problems. A few case reports have documented genetically identical Helicobacter strains in a pet and its owner living in the same household. Some studies suggest people with regular dog or cat contact have higher rates of Helicobacter infection, while others show no link.

The strains that commonly infect pets (H. felis, H. canis, H. heilmannii) are mostly genetically distinct from H. pylori, the species responsible for the vast majority of human infections. So while cross-species transmission is theoretically possible and has likely occurred in isolated cases, pets are not considered a primary source of H. pylori. Basic hygiene, like washing your hands after handling pets and before eating, is a reasonable precaution.

How H. Pylori Infection Is Detected

If you suspect you have H. pylori, two non-invasive tests are most commonly used. The urea breath test has you drink a solution containing a special form of urea. If H. pylori is present, its enzyme breaks down the urea and you exhale labeled carbon dioxide, which the test detects. The most widely used version of this test has a sensitivity of about 96 to 98% and a specificity around 93 to 95%, making it highly reliable.

The stool antigen test looks for H. pylori proteins in a stool sample and has an accuracy above 90%. Both tests can also be used after treatment to confirm the infection has been cleared. Endoscopy with biopsy is reserved for cases where there’s a need to visually inspect the stomach lining or when other tests give unclear results.