Stunting remains a major public health challenge in Indonesia, with national prevalence among children under five reaching 21.6% in 2022, according to the Ministry of Health. This condition, defined by the World Health Organization as a height-for-age less than -2 SD, is associated with long-term consequences including impaired cognitive development, reduced educational attainment, and diminished economic productivity. Addressing stunting is therefore critical to achieving Sustainable Development Goals (SDGs) related to hunger, health, and education. Despite multiple national initiatives, early identification of stunting risk is still limited by reliance on conventional, reactive surveillance methods. Recent advances in machine learning (ML) provide promising alternatives for proactive stunting prediction, with several studies reporting high predictive accuracy using ensemble methods, hybrid frameworks, and geographically weighted models. Building upon this evidence, the present study develops and evaluates ML models for stunting risk prediction using a large dataset of 10,000 records from North Sumatra, Indonesia. The dataset included three predictor variables—age, height, and weight—and a target variable, nutritional status (Normal, Stunted, Severely Stunted, Tall). Four algorithms were compared: K-Nearest Neighbors (KNN), Naïve Bayes, Decision Tree, and Random Forest. Performance was assessed using accuracy, precision, recall, F1-score, and ROC area, with 10-fold cross-validation ensuring robust estimation. Results demonstrated that Decision Tree (88.6% accuracy) and Random Forest (88.3% accuracy) outperformed KNN (84.7%) and Naïve Bayes (72%). ROC areas further confirmed the superiority of ensemble-based approaches, particularly Random Forest (0.979). Statistical significance was tested using McNemar’s test, revealing that Decision Tree and Random Forest achieved comparable performance (p = 0.651), both significantly outperforming KNN and Naïve Bayes (p < 0.05). This study contributes a context-specific evaluation of ML methods for stunting prediction in North Sumatra, emphasizing not only predictive accuracy but also interpretability to support health policy and program implementation. By bridging data-driven insights with actionable decision support, the proposed framework advances progress toward SDG-aligned strategies and provides a foundation for more targeted and preventive interventions in child nutrition and growth monitoring.