Inflammatory bowel disease (IBD) diagnosis depends on criteria based on histological, endoscopic, radiological, and clinical results. These studies show drawbacks as being expensive, invasive, and time-consuming. In this work, an untargeted metabolomic strategy based on the monitoring of volatile compounds in serum by headspace gas chromatography–mass spectrometry is proposed as a complementary, fast, and efficient test for IBD patient diagnosis. To develop the method and build a chemometric model that allows the IBD diagnosis, serum samples including IBD patients and healthy volunteers were collected. Analyses were performed by incubating 400 µL of serum for 10 min at 90 °C. For data processing, an untargeted metabolomic strategy was used. A total of 96 features were detected, of which a total of 10 volatile compounds could be identified and confirmed by means of the analysis of real standards. The chemometric treatment consisted of a discriminant analysis of orthogonal partial least squares (OPLS-DA) obtaining a 100% of classification rate, since all the analyzed samples were correctly classified.Graphical abstractSupplementary informationThe online version contains supplementary material available at 10.1007/s00216-023-04748-x.