H. pylori spreads from person to person, most often within families during early childhood. Roughly 44% of adults worldwide carry the bacteria, and most pick it up before age five, typically from a parent. The infection passes through contact with vomit, stool, or possibly saliva, and can also travel through contaminated water in areas without reliable sanitation.
Person-to-Person Spread Is the Main Route
H. pylori reaches you through three biological pathways: fecal-oral (traces of infected stool reaching your mouth), oral-oral (through saliva), and gastric-oral (through vomit). Of these, exposure to an infected person’s vomit appears to be the single biggest driver. A CDC-published study of household transmission found that contact with vomit from an infected person explained more than 50% of all new infections and over 70% of confirmed new cases. When someone in a household had a stomach bug that involved vomiting, the risk of spreading H. pylori to other family members jumped dramatically.
The bacteria can be recovered most reliably from vomit and from stool during episodes of diarrhea, when material moves quickly through the gut. This means a routine stomach illness in the household can become the moment H. pylori passes to someone new, even if nobody realizes the vomiting person carries it.
Most People Get It in Early Childhood
If you’re an adult wondering when you picked up H. pylori, the answer is almost certainly before you turned five. Research consistently shows that acquisition drops sharply after that age, regardless of where a child lives or how much contact they have with other children. Day care attendance, for example, doesn’t raise the risk. In one large study, almost 90% of children had attended day care, yet their infection rates were no higher than children cared for exclusively at home.
The most common source is a child’s own mother. Evidence strongly supports the idea that transmission happens primarily from mother to infant within the family unit, not from child-to-child contact at school or day care. Other household members can also pass it along, but the mother-child link is the strongest and most studied. This explains why H. pylori tends to cluster in families: if one parent carries it, the children are far more likely to as well.
Contaminated Water and Food
In places without reliable clean water, the environment itself becomes a source of infection. H. pylori has been found in tap water samples and in the biofilm that builds up inside water pipes. The bacteria can survive for extended periods in water distribution systems, especially when chlorine levels are low. A study in Peru detected H. pylori in tap water and pipe biofilms across multiple districts, with the positive samples all having extremely low chlorine residual, well below the levels needed to kill the organism.
Vegetables irrigated or washed with contaminated water are another potential vehicle. In developing countries where untreated water is used for agriculture or household purposes, this environmental route likely contributes to the high infection rates seen in those populations. If you live in an area with treated municipal water, this route is far less of a concern.
Living Conditions That Raise Your Risk
Several environmental factors make infection more likely:
- Crowded housing. Living with many people in close quarters increases the chance of exposure, especially if someone in the household is infected and experiences vomiting or diarrhea.
- Lack of clean running water. Without treated water for drinking, cooking, and handwashing, fecal-oral transmission becomes much easier.
- Living in a developing country. The combination of crowding, limited sanitation, and untreated water makes H. pylori infection far more common. Prevalence in some low-income regions exceeds 70%, compared to lower rates in countries with better infrastructure.
These factors help explain why global prevalence remains so high. Even among children and adolescents, about 35% carry the infection worldwide.
How the Bacteria Survive Your Stomach
Your stomach is one of the most hostile environments in your body, with acid strong enough to break down food and kill most bacteria. H. pylori gets around this by producing an enzyme that generates ammonia, which neutralizes the acid in its immediate surroundings. This creates a small pocket of near-neutral conditions right around the bacterium, allowing it to burrow into the protective mucus lining of the stomach wall. Once embedded there, it can persist for decades if left untreated, which is why most people who were infected as toddlers still carry it as adults without ever knowing.
What Doesn’t Cause H. Pylori
Spicy food does not cause H. pylori infection or the ulcers it can lead to. This is one of the most persistent myths in digestive health. Scientific evidence does not support diet as a meaningful factor in developing or recovering from ulcers. Stress is another commonly blamed culprit. While studies show an association between high stress and higher rates of ulcer disease, stress is not considered a cause. It may worsen symptoms in someone who already has the infection, but it won’t give you H. pylori.
The infection is also not something you catch from a toilet seat, a swimming pool, or breathing the same air as someone (outside of aerosolized vomit during an active stomach illness). It requires actual ingestion of the bacteria through one of the established routes.
Reducing Your Risk
Because H. pylori spreads through fecal and oral contact, the most effective prevention comes down to basic hygiene. Thorough handwashing with soap, particularly after using the bathroom and before preparing or eating food, is the single most practical step. If you’re traveling to or living in an area without reliably treated water, drinking only bottled or boiled water and avoiding raw produce washed in local water reduces your exposure. In households where someone is vomiting from a stomach illness, careful cleanup and handwashing afterward matters more than most people realize, given how central vomit exposure is to household transmission.
There is no vaccine for H. pylori. For most adults who already carry it, the infection was acquired so long ago that prevention is no longer the relevant question. If you’ve tested positive, the focus shifts to whether treatment is needed based on your symptoms or risk factors for complications like ulcers or stomach cancer.