They are carnivores
Due to their nocturnal nature, badgers spend the majority of their time foraging at night. Some badger species, such as the honey badger, seek food on their own, while others, such as the Javan ferret-badger, occasionally forage in groups. Badgers are known to be carnivores. Earthworms, insects, grubs, and the eggs and young of ground-nesting birds make up a substantial portion of the Eurasian badger's diet. They also consume fruit, roots, and small animals, amphibians, reptiles, and birds. They may enter cages to occasionally prey on farm chickens but a fox cannot. Badgers in southern Spain eat a lot of rabbits as food.
American badgers are fossorial carnivores, meaning they dig up a large percentage of their prey to eat. They can quickly tunnel for rodents that live under the earth. The African honey badger climbs trees to acquire honey from beehives and eats honey, porcupines, and even poisonous snakes. In addition to their main diet of earthworms, insects, and amphibians, certain animals, like the Chinese ferret-badger, are omnivores that consume a range of fruits and vegetables. After consuming rotten fruit, badgers have been observed to become inebriated by alcohol. Due to their opportunistic feeding habits, honey badgers adapt their diet to the seasonal availability of prey.
In addition, they are also known to be predators of hedgehogs incredible. It can expertly defeat and consume hedgehogs. Hedgehog rescue organizations avoid releasing hedgehogs into known badger territories since badgers are the major predator of hedgehogs in Britain, where hedgehog populations are demonstrably lower in locations with a high badger population. Although there are few records of badgers doing this in the wild, it is known that they store food in their dens. To determine if American badgers would try to store creatures that were larger than themselves, researchers at the University of Utah investigated the behavior of the animals in 2016. Two scientists installed cameras and dumped two dead calves in the desert. Over days, two badgers buried the animal remains independently. To sleep close to the buried animals, they also constructed dens for themselves. The accomplishment was especially noteworthy because the calves were three to four times heavier than the badgers.