Earthworms (Lumbricina) are common terrestrial invertebrates of the order Annelida, known as ringed or segmented worms. They are decomposers and detritivores, and are important for the natural balance of the ecosystem. The earthworm’s role is to eliminate decaying or dead organic matter from the soil, which is subsequently enriched by the earthworm’s secretions. They are also an excellent source of protein for their predators. So what exactly do these slimy worms eat as they burrow in the soil?
The Earthworm Diet

Earthworms eat soil.
©Nick N A/Shutterstock.com
Earthworms are decomposers, meaning they break down organic matter into basic nutrients for the soil. They are also detritivores, meaning they eat dead organic matter, including feces. Simply put, earthworms eat soil. Soil contains organic matter, including plant material, dead and decaying animals, algae, fungi, bacteria, protozoa, nematodes, rotifers, and other microorganisms.
The diet of wild earthworms is different from the diet of earthworms in captivity. Wild earthworms are at risk of ingesting pesticides and other harmful substances, which are then passed on to their predators. Earthworms in captivity are often fed food scraps, which turn into compost as they’re excreted.
How Earthworms Find Food

One acre of healthy soil can support more than a million earthworms.
©schankz/Shutterstock.com
Most earthworm species prefer neutral to slightly acidic soil, however, they aren’t as much concerned about finding food as they are about being able to breathe and stay moist in the soil. Worms and other animals will often follow what is known as a chemical trail, called chemotaxis, for navigating and finding food.
Once they find suitable soil conditions, earthworms start searching for food sources. When there is no chemical trail to follow, earthworms use a process called infotaxis to gather information, which helps them assess the environment and decide where to search. Some earthworms, also called nightcrawlers, will surface during the night to pull fallen brush and leaves into their burrows. When the leaf softens, they will then begin to consume it.
How Earthworms Eat
The earthworm’s digestive system has a mouth, buccal cavity, esophagus, crop, gizzard, intestine, and anus. It forms a straight long tube from the mouth to the anus. Earthworms have no teeth, so they swallow their food whole. The crop is used to store food, while the gizzard is a specialized stomach that grinds up food with the aid of grit or stone. Earthworms use a lip-like flap to push food in, after which their throat muscle takes hold to lubricate it with saliva and push it down the esophagus.
A Complete List of Foods Earthworms Eat
There are three categories of earthworms:
- Leaf-litter or compost-dwelling (epigeic) are nonburrowing and eat decaying organic matter on the surface, such as the red worm (Eisenia fetida)
- Topsoil- or subsoil-dwelling (endogeic) worms burrow in and eat the soil
- Permanent burrow-dwelling (anecic) worms visit the surface for plant matter, like the nightcrawler (Lumbricus terrestris)
What wild earthworms eat:
- Microorganisms
- Fruits and vegetables
- Leaves, grass, and other plant matter
- Fungi
- Algae
- Dead animals
What earthworms in captivity (compost worms) eat:
- Fruit and vegetable scraps
- Eggshells
- Grains (in moderation)
- Dry garden leaves
- Tea bags and coffee grounds
- Moldy bread
- Hair and nail clippings
- Shredded newspaper (black ink only) and cardboard
- Cotton rags
- Cow and horse manure