Importance: Much research on sanitation and linear growth in low- and middle-income countries focuses on children younger than 5 years. However, poor sanitation may be associated with growth faltering during middle and late childhood to a greater extent than previously recognized., Objective: To characterize the association of poor sanitation with height-for-age z (HAZ) scores in children and adolescents in India aged 0 to 18 years., Design, Setting, and Participants: This cross-sectional study examined 134 882 children and adolescents aged 0 to 18 years who were surveyed in the fourth round of India's District Level Household and Facilities Survey (survey conducted August 2012 to February 2014). Data were analyzed from June 1, 2019, to August 20, 2019., Exposures: Proportion of households reporting open defecation at the village level (to account for its high negative externality) and household-level access to boiled or filtered drinking water., Main Outcomes and Measures: Individual-level HAZ scores were measured in standard deviations. The association of exposures with outcomes was estimated using ordinary least-squares regression stratified by sex (boys and girls) and 4 age groups (≤1, >1 to ≤7, >7 to ≤12, >12 to ≤18 years). Models controlled for parental height and education, socioeconomic status, maternal age at birth, hemoglobin level, and indicators for state and birth year to adjust for regional (state) and temporal (birth year) fixed effects., Results: The sample comprised 70 463 male (52.5%) and 64 419 female (47.8%) children and adolescents aged 0 to 18 years; 46 722 participants (34.6%) were aged older than 12 to 18 years. Open defecation was inversely associated with HAZ score among all age groups except boys aged 1 year and younger (>1 to ≤7 years: β, -0.22; 95% CI, -0.35 to -0.10; >7 to ≤12 years: β, -0.15; 95% CI, -0.24 to -0.06; >12 to ≤18 years: β, -0.10; 95% CI, -0.19 to -0.01) and among girls aged between 7 and 18 years (>7 to ≤12 years: β, -0.22; 95% CI, -0.33 to -0.12; >12 to ≤18 years: β, -0.16; 95% CI, -0.23 to -0.09). Boiled or filtered drinking water was positively associated with HAZ score among younger girls (≤1 year: β, 0.26; 95% CI, 0.07 to 0.45; >1 to ≤7 years: β, 0.07; 95% CI, 0.01 to 0.14) and across all age groups in boys (≤1 years: β, 0.19; 95% CI, 0.03 to 0.35; >1 to ≤7 years: β, 0.07; 95% CI, 0.00 to 0.14; >7 to ≤12 years: β, 0.08; 95% CI, 0.03 to 0.13; >12 to ≤18 years: β, 0.06; 95% CI, 0.01 to 0.11)., Conclusions and Relevance: In this study, open defecation and lack of boiled or filtered drinking water were inversely associated with height-for-age measures across all ages in children and adolescents in India. Improved sanitation may benefit growth among children and adolescents older than 5 years.