Abstract In the realm of document examination, the identification of suspicious alterations to handwritten documents is an important factor in case characterisation. Investigating the differences in gel pen ink compositions has significant implications. In this study, we used desorption electrospray ionisation mass spectrometry (DESI-MS) to analyse the ink compositions of gel pens. The methodology involved the following steps. (1) Sample selection: a total of 227 gel pens available in the market were procured for the study. (2) Pre-experimental parameter exploration: preliminary experiments were performed to optimise the experimental parameters. (3) Analytical technique: DESI-MS was used to collect compositional data from the gel pen ink samples, without requiring pre-treatment of the samples. (4) Data analysis: the obtained data were analysed using the Davies–Bouldin index, Calinski–Harabasz index, and K-means algorithm for ink sample classification. The experimental findings indicated that DESI-MS is a viable method for examining the ink compositions of gel pens. Notably, the testing process is minimally destructive and does not necessitate pre-treatment of the samples. Furthermore, variations in the ink compositions were observed among different models of gel pens within the same brand, and the extent of the variation in the composition varied across brands. Additionally, there were instances in which the ink compositions of different brands of gel pens exhibited similarities.