Abstract Cutaneous squamous cell carcinoma (cSCC) is a common skin cancer and leads to a significant disease burden. Although metastases occur in < 5% of patients, effective treatments are limited and 5-year survival is poor, with mortality rates equivalent to those of melanoma in some regions of the world. Despite recent advances in understanding the molecular pathogenesis of cSCC, patient risk stratification is limited and based on clinicopathological staging, with few validated prognostic biomarkers available to guide management [de Jong E, Lammerts MUPA, Genders RE, Bowes Bavinck JN. Update of advanced cutaneous squamous cell carcinoma. J Eur Acad Dermatol Venereol 2022; 36(Suppl. 1):6–10]. In this study, we aimed to use artificial intelligence technology to develop a deep learning model using digitized whole-slide images of cSCC to quantify the risk of metastasis. Routine haematoxylin and eosin-stained slides of 256 primary cSCCs from immunocompetent patients at four collaborating centres were scanned. The area of interest encompassing tumour and peritumoral stroma was annotated, and 512 × 512 pixel tiles were generated from each slide. High-quality tiles (containing sufficient tumour content) were pooled together, with patient-level labels inherited by tiles. We trained multiple models using an 80:10:10 split for training, validation and testing, and the model achieving the highest tile- and slide-level validation accuracy was identified (ResNet50). The final model, namely, cSCCnet, achieved 88% sensitivity, 73% specificity, 64% positive predictive value and 92% negative predictive values on the independent test set. Blinded review of the top predictive tiles by three histopathologists suggested that the predictive features identified by cSCCnet were distinct from histopathological features commonly used by clinicians to estimate metastatic risk. We have demonstrated that it is possible to train a deep learning model using digital pathology to predict the risk of metastasis. cSCCnet surpassed the published performance of currently used staging systems, as well as commercially available gene panel testing (de Jong et al.; Wysong A, Newman JG, Covington KR et al. Validation of a 40-gene expression profile test to predict metastatic risk in localized high-risk cutaneous squamous cell carcinoma. J Am Acad Dermatol 2021; 84:361–9). The morphological features and patterns identified by cSCCnet are different from established histopathological high-risk criteria, indicating that this technology can enhance current practice. Although further validation in a prospective cohort is pending, this is an important step toward creating a risk stratification tool that can be incorporated into routine pathology workflows, significantly improving patient outcomes for this common cancer.