Introduction: Stunting is known to be a major public health problem among Indonesian children. We aimed to examine the association between dietary diversity and vitamin D intake with stunting in children aged 6-23 months. Methods: This case-control study was conducted in Bantul District, Yogyakarta Special Region, Indonesia. A total of 79 subjects aged 6-23 months were selected for each case and control group based on their stunting status. We assessed potential explanatory variables at the child, parental, household, and community levels. Results: Factors which were significantly associated with stunting included young children aged 1823 months (adjusted OR = 3.84; 95% CI: 1.17-12.26), birth length ≥48 cm (adjusted OR = 0.36; 95% CI: 0.16-0.83), inadequate intake of vitamin D (adjusted OR = 5.18; 95% CI: 1.03-26.02), and diversified diet (adjusted OR = 0.17; 95% CI: 0.03-0.92). Other variables such as household economic status, living residency, history of exclusive breastfeeding, and infectious diseases, as well as intakes of energy and protein were not significantly related to stunting. Conclusion: Minimum dietary diversity, vitamin D intake from complementary foods, and birth length were associated with stunting status among children. Therefore, it is crucial to focus on stunting prevention programmes in the first two years of life, or even since the preconception period.