Badgers are considered omnivorous, although their diet varies so much in different countries they are also sometimes termed ‘local specialists’. They will eat a wide variety of foods. The main element of their diet in the UK is the humble earthworm, in Italy it is Olives. Badgers in the UK will also eat insects, voles, mice, carrion, young rabbits, wasps nests, fruit, funghi and some cereals. Cereals are taken only during periods of drought when the ground is hard and more preferred foods (earthworms) are hard to find.
Many badgers visit gardens for food put out for them or birds. They will eat most leftovers, windfall fruit, etc, but take care to avoid putting out large quantities of processed foods such as cake (which is just as bad for badgers as it is for humans). It may also be wise to avoid leaving out things such as the remains of cooked poultry carcases; although badgers, who love to strip the remaining meat and get at the marrow, will not be harmed by the spiky cooked bones, domestic pets may try to take a share and in their case brittle cooked bones can cause problems. Some badger-watchers pile stones over such treats to deter domestic pets. Stirring peanuts into loose sand means the badgers have to spend more time extricating the food, so you get to watch them for longer!
Avoid leaving out foods like chocolate, milk, cream, cheese and other dairy products. Many animals can be harmed by fairly small amounts of chocolate, and hedgehogs will eat dairy products, even though it can harm their digestion!