Background Viral encephalitis (VE) is a severe neurological emergency; however, timely diagnosis remains challenging, particularly in resource-limited settings. This study aimed to develop and validate an interpretable machine learning (ML) model for the preliminary risk stratification of VE based solely on routine blood analysis (RBA). Methods A retrospective cohort of patients ( n = 313, train/test = 8/2) with suspected VE was collected from the electronic health records of a tertiary hospital