You most likely picked up H. pylori from another person, either through direct contact with vomit, saliva, or stool, or indirectly through contaminated water or food. The bacterium infects roughly 44% of adults worldwide, so the exposure opportunities are far more common than most people realize. Pinpointing the exact moment you were infected is nearly impossible, because the bacteria can live silently in the stomach for years or even decades before causing symptoms.
Person-to-Person Spread Is the Main Route
H. pylori passes between people through what scientists call fecal-oral and oral-oral routes. In practical terms, that means the bacteria leave one person’s body through stool, vomit, or saliva and enter another person’s mouth. This doesn’t require dramatic exposure. A household member with a stomach bug who doesn’t wash their hands thoroughly, a kiss, shared utensils, or a caregiver changing a diaper can all create an opportunity for the bacteria to spread.
A CDC-published study tracking households over time found that living with an infected person who had a stomach illness raised the risk of new infection nearly fivefold. Vomiting was the bigger culprit: exposure to vomit from an infected household member accounted for more than half of all new infections in the study and over 70% of the confirmed ones. Even diarrheal illness in a housemate increased risk, though less dramatically.
Of all new infections identified in the study, 75% were directly linked to exposure to a sick household member. That makes close household contact, especially during bouts of gastroenteritis, the single best-documented way H. pylori spreads.
You Were Probably Infected in Childhood
Most H. pylori infections are acquired during the first few years of life. Children under two pick up the bacteria at three times the rate of the general population, with an annual infection rate of about 21% in that age group compared to 7% overall. Young children are especially vulnerable because they’re in constant close contact with caregivers, they put objects in their mouths, and their immune systems are still developing.
Once H. pylori colonizes the stomach lining, it can persist for life without treatment. The actual incubation period from swallowing the bacteria to initial infection is only about three days, but symptoms like stomach pain, nausea, or bloating may not appear for years, if they ever do. Many people carry the infection for decades before it’s discovered during testing for something else entirely. So even though you were just diagnosed, there’s a good chance you’ve had it since childhood.
Water and Food Can Carry the Bacteria
H. pylori can also reach you through contaminated water or food, behaving much like a waterborne pathogen. In regions where water treatment is less reliable, the bacteria have been detected in drinking water, raw vegetables, and animal-based foods. One large review found H. pylori present in about 11% of food, vegetable, and water samples tested.
Well water and untreated surface water carry higher risk than municipal tap water in developed countries. If you grew up in a region with limited water sanitation, or if you traveled to one, that’s another plausible source. Food prepared by someone who didn’t wash their hands properly after using the bathroom is another common pathway. The bacteria have also been isolated from saliva and dental plaque, which means sharing drinks or food with an infected person creates a low-level but real opportunity for transmission.
Living Conditions Shape Your Risk
Certain environments make H. pylori transmission much more likely. Crowded households are a well-documented risk factor, raising the odds of infection by about 38% compared to less crowded living situations. The logic is straightforward: more people sharing bathrooms, kitchens, and sleeping spaces means more opportunities for the bacteria to pass from one person to another.
Global patterns reflect this. H. pylori prevalence has dropped from about 53% before 1990 to around 44% in recent years, largely in regions where sanitation and living standards have improved. But rates remain stubbornly high in many parts of Africa, South America, and parts of Asia. Among children and adolescents, prevalence hasn’t significantly decreased in any world region, sitting at roughly 35%. If you grew up in a large family, in close quarters, or in an area with limited sanitation infrastructure, your odds of early infection were substantially higher.
How H. Pylori Survives Your Stomach
Part of the reason H. pylori is so persistent is its remarkable ability to survive stomach acid. Your stomach maintains a pH around 1 to 2, acidic enough to dissolve metal. Most bacteria die within seconds in that environment. H. pylori produces an enzyme that breaks down urea (a naturally occurring compound in the stomach) into ammonia. That ammonia neutralizes the acid immediately surrounding the bacterium, creating a tiny pocket of near-neutral pH. The bacteria essentially build their own acid shield, allowing them to survive for hours even in the harshest stomach conditions.
This is why you can carry H. pylori for so long without your body clearing it on its own. The bacteria burrow into the mucus lining of the stomach wall, where acidity is already lower, and use their ammonia trick to handle whatever acid reaches them. Your immune system recognizes the infection and mounts a response, but it’s rarely enough to eliminate the bacteria completely without antibiotic treatment.
Reducing the Chance of Reinfection
Once you’ve been treated and cleared H. pylori, reinfection is possible, though rates are relatively low in countries with good sanitation. The same routes that caused your original infection still apply, so prevention comes down to basic hygiene. Washing your hands thoroughly after using the bathroom and before handling food is the single most effective step. If someone in your household is being treated for H. pylori or is dealing with a stomach illness, be especially careful about cleaning shared bathroom surfaces and avoiding contact with vomit.
Drinking treated or bottled water when traveling to areas with uncertain water quality also lowers your risk. If you’re eating street food or raw vegetables in those settings, the risk is higher. There’s no vaccine for H. pylori, so these practical steps are your main line of defense against picking it up again.

