Background: The prevalence of stunting in Indonesia has decreased gradually. The strategy to reduce stunting is currently prioritized on improving socio-economic levels, fulfilling food intake, and sanitation conditions. This study aims to analyze the association between sociodemographics, nutrition, and sanitation on stunting in rural West Java Province in Indonesia. Design and methods: A cross-sectional study was conducted in May–August 2022 among 247 mother-children pairs, selected by systematic random sampling from a rural area of West Java Province in Indonesia. The sociodemographic characteristics were measured using a structured questionnaire. The nutritional status of the children under five was assessed by length/height-for-age (HAZ), and was calculated using WHO Anthro software. Sanitation is assessed using observation and interviews with a structured questionnaire. Results: The prevalence of stunting in children under five was 20.7% (5.3% severely stunted and 15.4% stunted). Binary logistic regression analysis using SPSS version 22.0 show that mother’s height as the dominant factor associated with stunting in children under five (AOR = 3.45, 95% CI: 1.12–4.67, p = 0.008). In addition, children’s age (AOR = 0.250, 95% CI: 0.104–0.598, p = 0.002); balanced diet practices (AOR = 1.57, 95% CI: 0.965–2.56, p = 0.069), and building materials (AOR = 1.869, 95% CI: 0.87–4.00, p = 0.108 are also related to stunting in children under five. Conclusions: Efforts to improve maternal nutrition need to be carried out from the period before pregnancy to the first 1000 days of life. Education on healthy home indicators, especially the use of this type of building materials for houses, needs to be done to improve sanitation as an effort to prevent stunting in children under five.