Ecological conditions are likely to change with increasing urbanization, influencing the demography and size of animal populations. Although one of the most tightly linked species to humans, the house sparrow has been suffering a significant decline worldwide, especially in European cities. Several factors have been proposed to explain this conspicuous loss of urban sparrows, but studies evaluating these factors are usually restricted to Britain where the decline was very drastic, and it is unclear whether similar or different processes are affecting urban populations of the species elsewhere. In this study we investigated the reproductive success of urban and rural sparrows in a central European country, Hungary where our census data indicate a moderate decline during the last decade. We found that rural pairs produced more and larger fledglings than suburban pairs, and the difference remained consistent in two years with very contrasting meteorological conditions during breeding. This difference is likely explained by habitat differences in nestling diet, because we found that 1) rural parents provided large prey items more often than suburban parents, 2) birds from differently urbanized habitats produced fledglings of similar number and size in captivity under identical rearing conditions with ample food for nestlings, and 3) in a cross-fostering experiment, nestlings tended to grow larger in rural than in suburban nests irrespective of their hatching environment. These results agree with those found in a recent British study, indicating that poor nestling development and survival due to inadequate diet may be widespread phenomena in urbanized habitats.