The majority of woodpecker species live up to their name and feed on insects and other invertebrates living under bark and in wood, but overall the family is characterized by its dietary flexibility, with many species being both highly omnivorous and opportunistic.
The ability to excavate allows woodpeckers to obtain tree sap, an important source of food for some species.