South Africa is one of only a handful of countries in which the prevalence of child stunting actually increased during the period (2000–2015) in which global progress towards child health was being monitored. One section of the literature suggests that stunting is a largely rural phenomenon in South Africa which is explained by high rates of poverty, poor living conditions and a low quality and monotonous diet. Another section, however, suggests that highly processed foods available in expanding retail chains have been contributing to a low quality diet across the country, but particularly in poor urban households. To examine these claims about spatial differences in stunting, we use nationally representative longitudinal data (2008–2014) to measure stunting among South African children and adolescents aged 0–19, with particular attention to the determinants of stunting and how its prevalence differs between urban and rural areas. The results suggest that, first, stunting has a strong spatial component in South Africa but that this can be explained, in large part, by observable factors such as household income, living conditions, and access to basic services. Second, subsistence farming has a significant protective role with respect to stunting, even after controlling for household resources and living conditions. Overall, the results suggest that more attention should be paid to low-quality food and ‘food systems’ as drivers of stunting in both rural and urban areas of a middle-income country such as South Africa.