The method of recovering Helicobacter pylori DNA or viable cells absorbed on a string that a person has swallowed and that is retrieved an hour later (string test) should be a useful alternative to traditional analysis of cells or DNA obtained by endoscopy, which is invasive, uncomfortable, relatively costly, and ill-suited for community-based and pediatric studies. Here we assayed the sensitivity and validity of the string test versus conventional endoscopic biopsy for detecting and analyzing H. pylori infection. Forty-four people with gastric complaints were studied using both H. pylori culture and urease gene (ureB) PCR. H. pylori organisms cultured from strings and biopsy specimens from the same patients were fingerprinted by the randomly amplified polymorphic DNA (RAPD) method. Biopsy sections were also hematoxylin and eosin and silver stained for H. pylori detection. H. pylori was cultured from 80% of strings and detected by PCR from 91% of strings from participants whose biopsies had been H. pylori positive by culture, PCR, and/or histology. Strains recovered from strings and biopsy specimens yielded identical or closely related RAPD profiles in each of the 24 cases tested. We conclude that the string test is a useful method for H. pylori recovery and analysis when relatively noninvasive procedures are needed.