Several of the most ambitious theories in ecology describe food webs that document the structure of strong and weak trophic links that is responsible for ecological dynamics among diverse assemblages of species. Early mechanism-based theory asserted that food webs have little omnivory and several properties that are independent of species richness. This theory was overturned by empirical studies that found food webs to be much more complex, but these studies did not provide mechanistic explanations for the complexity. Here we show that a remarkably simple model fills this scientific void by successfully predicting key structural properties of the most complex and comprehensive food webs in the primary literature. These properties include the fractions of species at top, intermediate and basal trophic levels, the means and variabilities of generality, vulnerability and food-chain length, and the degrees of cannibalism, omnivory, looping and trophic similarity. Using only two empirical parameters, species number and connectance, our 'niche model' extends the existing 'cascade model and improves its fit ten-fold by constraining species to consume a contiguous sequence of prey in a one-dimensional trophic niche.