Helicobacter pylori imparts a considerable burden to public health. Infections are mainly acquired in childhood and can lead to chronic diseases, including gastric ulcers and cancer. The bacterium subsists in water, but the environment's role in transmission remains poorly understood. The nationally representative National Health and Nutrition Examination Survey (NHANES) was examined for environmental risk factors associated with H. pylori seroprevalence. Data from 1999–2000 were examined and weighted to represent the US population. Multivariable logistic regression estimated adjusted odds ratios (aOR) and 95% confidence intervals (CI) for associations with seropositivity. Self-reported general health condition was inversely associated with seropositivity. Of participants aged <20 years, seropositivity was significantly associated with having a well as the source of home tap water (aOR 1·7, 95% CI 1·1–2·6) and living in a more crowded home (aOR 2·3, 95% CI 1·5–3·7). Of adults aged ⩾20 years, seropositivity was not associated with well water or crowded living conditions, but adults in soil-related occupations had significantly higher odds of seropositivity compared to those in non-soil-related occupations (aOR 1·9, 95% CI 1·2–2·9). Exposures to both well water and occupationally related soil increased the effect size of adults' odds of seropositivity compared to non-exposed adults (aOR 2·7, 95% CI 1·3-5·6). Environmental exposures (well-water usage and occupational contact with soil) play a role in H. pylori transmission. A disproportionate burden of infection is associated with poor health and crowded living conditions, but risks vary by age and race/ethnicity. These findings could help inform interventions to reduce the burden of infections in the United States.