Some carnivores are known to survive well in urban habitats, yet the underlying behavioral tactics are poorly understood. One likely explanation for the success in urban habitats might be that carnivores are generalist consumers. However, urban populations of carnivores could as well consist of specialist feeders. Here, we compared the isotopic specialization of red foxes in urban and rural environments, using both a population and an individual level perspective. We measured stable isotope ratios in increments of red fox whiskers and potential food sources. Our results reveal that red foxes have a broad isotopic dietary niche and a large variation in resource use. Despite this large variation, we found significant differences between the variance of the urban and rural population for δ13C as well as δ15N values, suggesting a habitat-specific foraging behavior. Although urban regions are more heterogeneous regarding land cover (based on the Shannon index) than rural regions, the dietary range of urban foxes was smaller compared with that of rural conspecifics. Moreover, the higher δ13C values and lower δ15N values of urban foxes suggest a relatively high input of anthropogenic food sources. The diet of most individuals remained largely constant over a longer period. The low intraindividual variability of urban and rural red foxes suggests a relatively constant proportion of food items consumed by individuals. Urban and rural foxes utilized a small proportion of the potentially available isotopic dietary niche as indicated by the low within-individual variation compared to the between-individual variation. We conclude that generalist fox populations consist of individual food specialists in urban and rural populations at least over those periods covered by our study. © 2020 The Authors. Ecology and Evolution published by John Wiley & Sons Ltd.