During floods, sediments suspended in river water deposit on floodplains. Thus, floodplains are a key to improving river water quality. Yet, the factors that determine the amount of fine sediment that deposits on floodplains are largely unknown. Plant diversity typically increases structural diversity, whereas the vegetation structure and the structural characteristics of individual species are known to influence sedimentation. We hypothesised that species diversity, in addition to species identity, may promote sediment retention. Our study aimed to disentangle the effects of species richness and species identity, via differences in vegetation structure, on sediment retention within herbaceous vegetation patches. In a flume experiment, we investigated sedimentation on 30 vegetation patches (40 × 60 cm2). We created patches with five different species-richness levels (3, 4, 6, 8, and 11 species), each replicated six times. Species were randomly selected from 14 common floodplain species. We inundated the patches with silt- and clay-rich water and measured the amount of accumulated sediment on the vegetation and on the ground underneath it. Species richness significantly increased sedimentation underneath the vegetation (R2 = 0.17). However, including species identity effects in a structural equation model, we showed that individual species' presence largely drove these effects. Alopecurus pratensis had a direct negative effect on sedimentation on the vegetation, whereas Bromus inermis and Elymus repens had indirect positive effects through an increase in total biomass (R2 = 0.42). Elymus repens had a direct negative, and Urtica dioica a direct positive effect on sedimentation underneath the vegetation (R2 = 0.38). Our results indicate that selecting the most effective species, rather than as many species as possible, may have the greatest benefits for promoting sedimentation. Overall, we conclude that floodplain management that aims to increase sediment retention should alter the vegetation structure of meadows by increasing vegetation biomass.