As no reliable diagnostic methods are available, gallbladder cancer (GBC) is often diagnosed until advanced stages, resulting in a poor prognosis. In the present study, we assessed whether volatile organic compounds (VOCs) could be used as a diagnostic tool for GBC. The VOCs in bile samples collected from 32 GBC patients were detected by gas chromatography-ion mobility spectrometry (GC-IMS), and 54 patients with benign gallbladder diseases (BGD) were used as controls. Both principal component analysis and unsupervised hierarchical clustering analysis gave a clear separation of GBC and BGD based on the bile VOC data collected from GC-IMS. A total of 12 differentially expressed VOCs were identified, including four upregulated (cyclohexanone, 2-ethyl-1-hexanol, acetophenone, and methyl benzoate) and eight downregulated [methyl acetate, (E)-hept-2-enal, hexanal, (E)-2-hexenal, (E)-2-pentenal, pentan-1-ol, 1-octen-3-one, and (E)-2-octenal] in GBC compared with BGD. ROC analysis demonstrated a 12-VOC panel con-structed by four machine learning algorithms, which was superior to the traditional tumor marker, CA19-9. Among them, support vector machines and linear discriminant analysis provided the highest AUCs of 0.972, with a sensitivity of 100% and a specificity of 94.4% in the diagnosis of GBC. Collectively, VOCs might be used as a potential tool for the diagnosis of GBC.