Conventional endoscopic biopsy tests are not suitable for early detection of the acute onset and progression of peptic ulcer as well as various gastric complications. This also limits its suitability for widespread population-based screening and consequently, many people with complex gastric phenotypes remain undiagnosed. Here, we demonstrate a new non-invasive methodology for accurate diagnosis and classification of various gastric disorders exploiting a pattern-recognition-based cluster analysis of a breathomics dataset generated from a simple residual gas analyzer-mass spectrometry. The clustering approach recognizes unique breathograms and "breathprints" signatures that clearly reflect the specific gastric condition of an individual person. The method can selectively distinguish the breath of peptic ulcer and other gastric dysfunctions like dyspepsia, gastritis, and gastroesophageal reflux disease patients from the exhaled breath of healthy individuals with high diagnostic sensitivity and specificity. Moreover, the clustering method exhibited a reasonable power to selectively classify the early-stage and high-risk gastric conditions with/without ulceration, thus opening a new non-invasive analytical avenue for early detection, follow-up, and fast population-based robust screening strategy of gastric complications in the real-world clinical domain.