Abstract Seed viability is one of the most important parameters that is directly related with seed germination performance and seedling emergence. In this study, a hyperspectral imaging (HSI) system having a range of 1000–2500 nm was used to classify viable watermelon seeds from nonviable seeds. In order to obtain nonviable watermelon seeds, a total of 96 seeds were artificially aged by immersing the seeds in hot water (25°C) for 15 days. Further, hyperspectral images for 192 seeds (96 normal and 96 aged) were acquired using the developed HSI system. A germination test was performed for all the 192 seeds in order to confirm their viability. Spectral data from the hyperspectral images of the seeds were extracted by selecting pixels from the region of interest. Each seed spectrum was averaged and preprocessed to develop a classification model of partial least square discriminant analysis (PLS-DA). The developed PLS-DA model showed a classification accuracy of 94.7% for the calibration set, and 84.2% for the validation set. The results demonstrate that the proposed technique can classify viable and nonviable watermelon seeds with a reasonable accuracy, and can be further converted into an online sorting system for rapid and nondestructive classification of watermelon seeds with regard to viability.