The ecology of earwigs in natural forest ecosystems is poorly understood. We used sweeping to determine the population densities of adult earwigs, by sex and species, on ten tree species in a temperate floodplain forest in southern Moravia (Czech Republic). We also determined the relationships between the properties of tree species and earwig density and diet as indicated by digestive tract contents. The densities and diet composition of earwigs differed between the three detected earwig species [Apterygida media (Hagenbach, 1822), Chelidurella acanthopygia (Genè, 1832) and Forficula auricularia Linnaeus, 1758] and among tree species. Earwig densities were related to lichen coverage and fungal coverage on the trees. The diet of earwigs was associated with specific leaf area, herbivore damage to the leaves, and light exposure of the trees. A. media was the most abundant of the three earwig species. Although the contents of its digestive tract changed depending on available food resources, A. media appeared to preferentially consume soft-bodied insect herbivores and fungi associated with wounds caused by herbivores rather than plant material. Therefore, this species has the potential to help reduce the population densities of soft-bodied pests of forest trees.