Worms are decomposers, as are slugs, bacteria, snails and fungi-like mushrooms, according to St. John Fisher College. SFGate states that earthworms are an example of a worm that acts as a decomposer.

Epigeic earthworms make their homes in plant litter, where they process compost. Endogeic earthworms are found in soil, specifically in the upper layers, where they primarily feed on organic matter. Anecic earthworms, such as the night crawler, transport and process vegetation in the deeper layers of soil. Regardless of where they live, all earthworms consume vegetation and dirt particles, which are broken down in the worm's body until they exit as deposits small enough for plants to use.