AbstractT‐lymphoblastic lymphoma (T‐LBL) and thymoma are two rare primary tumors of the thymus deriving either from T‐cell precursors or from thymic epithelial cells, respectively. Some thymoma subtypes (AB, B1, and B2) display numerous reactive terminal deoxynucleotidyl transferase‐positive (TdT+) T‐cell precursors masking epithelial tumor cells. Therefore, the differential diagnosis between T‐LBL and TdT+ T‐lymphocyte‐rich thymoma could be challenging, especially in the case of needle biopsy. To distinguish between T‐LBL and thymoma‐associated lymphoid proliferations, we analyzed the global DNA methylation using two different technologies, namely MeDIP array and EPIC array, in independent samples series [17 T‐LBLs compared with one TdT+ lymphocyte‐rich thymoma (B1 subtype) and three normal thymi, and seven lymphocyte‐rich thymomas compared with 24 T‐LBLs, respectively]. In unsupervised principal component analysis (PCA), T‐LBL and thymoma samples clustered separately. We identified differentially methylated regions (DMRs) using MeDIP‐array and EPIC‐array datasets and nine overlapping genes between the two datasets considering the top 100 DMRs including ZIC1, TSHZ2, CDC42BPB, RBM24, C10orf53, and MACROD2. In order to explore the DNA methylation profiles in larger series, we defined a classifier based on these six differentially methylated gene promoters, developed an MS‐MLPA assay, and demonstrated a significant differential methylation between thymomas (hypomethylated; n = 48) and T‐LBLs (hypermethylated; n = 54) (methylation ratio median 0.03 versus 0.66, respectively; p < 0.0001), with MACROD2 methylation status the most discriminating. Using a machine learning strategy, we built a prediction model trained with the EPIC‐array dataset and defined a cumulative score taking into account the weight of each feature. A score above or equal to 0.4 was predictive of T‐LBL and conversely. Applied to the MS‐MLPA dataset, this prediction model accurately predicted diagnoses of T‐LBL and thymoma. © 2024 The Author(s). The Journal of Pathology published by John Wiley & Sons Ltd on behalf of The Pathological Society of Great Britain and Ireland.