Fragmentation and loss of habitat are critical components of the global change currently threatening biodiversity and ecosystem functioning. We studied the effects of habitat loss through fragmentation on food web structure, by constructing and analyzing plant-herbivore and host-parasitoid food webs including more than 400 species and over 120 000 feeding records, in 19 Chaco Serrano remnants of differing areas. Food web structure was altered by habitat fragmentation, with different metrics being affected depending on interaction type, and with all changes being driven by the reduced size of networks in smaller fragments. Only connectance varied in both quantitative and qualitative analyses, being negatively related to area. In addition, the interactions were represented by proper successive subsets, modulated mainly by resource availability (plant–herbivore) or consumer specialization (host–parasitoid), as forest size decreased. The results suggest that habitat loss has led to food web contraction around a central core of highly-connected species, for plant–herbivore as well as for host–parasitoid systems. The study provides new insights into the effects of human perturbations on complex biological systems.