Intact ecosystems contain large numbers of competing but coexisting species. Although numerous alternative theories have provided potential explanations for this high biodiversity, there have been few field experiments testing between these theories. In particular, theory predicts that higher diversity of coexisting competitors could result from greater niche dimensionality, for example larger numbers of limiting resources or factors. Alternatively, diversity could be independent of niche dimensionality because large numbers of species can coexist when limited by just one or two factors if species have appropriate trade-offs. Here we show that plant coexistence and diversity result from the 'niche dimensionality' of a habitat. Plant species numbers decreased with increasing numbers of added limiting soil resources (soil moisture, nitrogen, phosphorus and base cations), which is consistent with theoretical predictions that an increased supply of multiple limiting resources can reduce niche dimension. An observational field study gave similar results. The niche dimension hypothesis also explained diversity changes in the classic Park Grass Experiment at Rothamsted. Our results provide an alternative mechanistic explanation for the effects of nutrient eutrophication on the diversity of terrestrial, freshwater and marine ecosystems.