Pill bugs eat primarily decaying plant material. Dead leaves, rotting wood, decomposing bark, and fallen fruit make up the bulk of their diet both in the wild and in captivity. They are detritivores, meaning they feed on organic matter that is already breaking down, and their appetite for dead vegetation makes them one of the most important recyclers in soil ecosystems. Feeding them as pets is straightforward once you understand what draws them to food in nature.
What Pill Bugs Eat in the Wild
In their natural habitat, pill bugs gravitate toward whatever is soft, damp, and decomposing on the forest floor. Fallen leaves are the staple. Oak, maple, elm, and other deciduous leaves that have sat on the ground long enough to begin breaking down are ideal, because fungi and bacteria have already started softening the tough cell walls. Pill bugs rarely eat fresh, green leaves still on a plant; they wait until the leaf is dead and colonized by microorganisms before moving in.
Beyond leaf litter, pill bugs feed on decaying wood, moss, bark mulch, rotting fruit, and fungal growth. They will nibble on mushrooms and mold colonies growing on damp surfaces. In gardens, they sometimes get blamed for eating live seedlings or strawberries, and while they can nibble on tender, ground-level plant tissue if conditions are wet enough, they strongly prefer material that is already dead or dying. A pill bug munching on a strawberry is almost always targeting one that has already started to rot where it contacts the soil.
They also eat things most people would not expect. Pill bugs will consume their own shed exoskeletons after molting, recycling the calcium carbonate back into their bodies. They occasionally feed on animal feces, dead insects, and other small bits of animal-derived organic matter they encounter. These protein-rich food sources seem to be supplementary rather than central to their diet, but pill bugs are opportunistic enough to take advantage of them when available.
How They Digest Tough Plant Fibers
Dead leaves and wood are made largely of cellulose and lignin, two of the toughest structural compounds in nature. Most animals cannot break these down on their own. Pill bugs, however, have a surprisingly sophisticated digestive system that combines their own enzymes with those produced by their gut microbes.
Research on the common pill bug, Armadillidium vulgare, has shown that both the animal itself and its associated microbiome produce specialized enzymes for dismantling plant cell walls. These enzymes, known collectively as carbohydrate-active enzymes, are produced by the pill bug’s own digestive tissues and also by bacteria and archaea living in its gut. The host and its microbial partners each contribute different parts of the enzyme toolkit, and together they can tackle the complex structure of lignocellulose far more effectively than either could alone.1PubMed Central. Lignocellulose degradation at the holobiont level: teamwork in a keystone soil invertebrate This cooperative arrangement between host and microbiome is a key reason terrestrial isopods were able to transition from the sea to life on land, where the dominant food source is tough, woody plant material.2PubMed Central. Lignocellulose degradation in isopods: new insights into the adaptation to terrestrial life
This dual digestive strategy also helps explain why pill bugs prefer food that is already partially decomposed. Fungi and bacteria in the soil begin breaking down cellulose and lignin before the pill bug ever arrives. By eating pre-colonized leaf litter, pill bugs get food that is already partly digested and comes loaded with microorganisms that provide additional nutrition. The microbes themselves become part of the meal.
How Temperature Affects How Much They Eat
Pill bugs are cold-blooded, so their metabolism speeds up or slows down with ambient temperature. Studies on the closely related species Armadillo officinalis found that animals kept at warmer temperatures ate significantly more, grew faster, and assimilated a greater proportion of the food they consumed compared to those kept in cooler conditions.3Journal of Arid Environments. Effects of temperature on transpiration, behaviour, growth and feeding habits of Armadillo officinalis (Isopoda, Oniscidea) in Benghazi, Libya This matters both in the wild and in captivity. In cooler weather or cooler rooms, your pill bugs will eat less and be less active, and that is normal. In summer or in a heated enclosure, they will plow through food noticeably faster.
This temperature sensitivity also explains seasonal patterns in the garden. Pill bugs are most active and most likely to be seen feeding during warm, humid nights in spring and summer. In winter, they retreat into sheltered spots under logs or deep in leaf litter, slow down dramatically, and eat very little until temperatures climb again.
Feeding Pet Pill Bugs
If you keep pill bugs in a terrarium or bioactive enclosure, replicating their wild diet is simple and cheap. The foundation of a captive diet should be dead leaves. Collect dried leaves from untreated trees like oak, magnolia, or maple, and keep a layer of them on the enclosure floor at all times. Oak leaves are a popular choice in the hobby because they decompose slowly and provide a long-lasting food source. Leaf litter also doubles as shelter, which makes pill bugs feel secure enough to come out and feed.
Beyond leaves, you can supplement with a variety of kitchen scraps and other foods:
- Vegetables: slices of carrot, zucchini, sweet potato, cucumber, and squash. Slightly wilted or overripe pieces work best because they are softer.
- Fruit: small amounts of apple, banana peel, melon rind, or berries. Remove uneaten fruit within a day or two to prevent mold from overtaking the enclosure.
- Calcium sources: cuttlebone, crushed eggshells, or limestone pieces. Pill bugs need calcium to build and maintain their exoskeleton, and they will actively seek it out.
- Protein: dried shrimp, fish flakes, or a small amount of plain cooked grain. Protein is especially useful for breeding colonies, where females carrying eggs benefit from the extra nutrition.
- Decaying wood: cork bark, rotting hardwood, or pieces of damp untreated lumber. These serve as both food and habitat.
Calcium deserves special emphasis. Unlike insects, pill bugs have a calcareous exoskeleton that they shed in two halves, first the back half and then the front. They eat the shed portion to reclaim minerals. In captivity, where the mineral content of available food may be lower than in nature, providing a dedicated calcium source prevents molting problems and keeps your colony healthy. Cuttlebone from the pet store (the kind sold for birds) is the easiest option. Just place a piece in the enclosure and replace it when it is consumed.
Foods and Substances to Avoid
Pill bugs are tolerant of a wide variety of plant-based foods, but a few things should stay out of their enclosure. Citrus peels and onion are commonly avoided by keepers, as pill bugs tend to ignore them anyway. Anything treated with pesticides or herbicides is dangerous; if you collect leaves or wood from outdoors, stick to areas you know have not been sprayed. Pine and cedar wood or shavings contain volatile oils that can be harmful to isopods and should be avoided as both food and bedding.
Salty, oily, or heavily processed human food has no place in a pill bug enclosure. Bread, chips, and cooked foods with added salt or fat can foul the substrate quickly and attract unwanted mold or pests. Stick to plain, unprocessed plant material and the supplements listed above, and you will not run into problems.
Their Outsized Role in Breaking Down Soil
Pill bugs are sometimes called nature’s composters, and the label is not an exaggeration. In many temperate ecosystems, terrestrial isopods process a meaningful fraction of the annual leaf fall. They chew leaf litter into smaller fragments, which dramatically increases the surface area available for microbial decomposition. Their fecal pellets are rich in partially digested organic matter and microbial biomass, and these pellets become food for bacteria, fungi, and other soil organisms that continue the breakdown process.
This cascading effect means pill bugs do not just eat dead leaves; they accelerate the entire nutrient-recycling pipeline. Nitrogen, phosphorus, and other nutrients locked up in dead plant tissue are released back into the soil faster when pill bugs are present. Gardeners who find pill bugs under their mulch are looking at a free composting service. The only time pill bugs become a genuine garden nuisance is when populations boom in very wet conditions and tender seedlings happen to be the softest organic material around, but even then the damage is modest compared to what slugs or caterpillars do.
Pollution and What It Means for Their Diet
Because pill bugs eat whatever is decomposing on the ground, they inevitably ingest pollutants that have settled into the soil. This makes them useful to researchers as bioindicators of contamination, but it also exposes them to substances their digestive systems did not evolve to handle.
Heavy metals are one concern. When pill bugs were fed food containing copper nanoparticles, their digestive systems dissolved those particles into copper ions, which were then absorbed into the digestive gland. The pattern of copper accumulation was essentially the same whether the animals ate nanoparticle copper or dissolved copper salts, meaning the gut effectively strips metal nanoparticles down to their ionic form and absorbs them just as it would soluble metal.4Environmental Science & Technology. Upon Exposure to Cu Nanoparticles, Accumulation of Copper in the Isopod Porcellio scaber Is Due to the Dissolved Cu Ions Inside the Digestive Tract This is relevant if you are collecting pill bugs from urban soils or areas near industrial activity; animals from contaminated sites carry higher metal burdens in their tissues.
Microplastics are a newer concern. Tiny plastic particles are now ubiquitous in soil, and pill bugs ingest them along with their food. A 2025 study found that pill bugs fed polystyrene microplastics for six weeks showed increased risk-taking behavior, meaning they spent more time exposed in the open rather than hiding, a shift that could make them more vulnerable to predators in the wild.5PubMed. Microplastic uptake with food increases risk-taking of a wide-spread decomposer, the common pill bug Armadillidium vulgare However, a separate study looking at whether microplastic contamination affected litter decomposition rates found no measurable short-term impact on how much pill bugs ate or how quickly they broke down leaf litter, and their body weight was unaffected as well.6Applied Soil Ecology. No short-term response of microbial or isopod-driven litter decomposition to microplastics The picture, then, is that microplastics may alter pill bug behavior without visibly harming their feeding performance in the short run. Whether long-term exposure changes that outcome is still an open question.
Do Different Species Eat Different Things?
When people say “pill bug,” they usually mean Armadillidium vulgare, the species that rolls into a tight ball when disturbed. But the broader group of terrestrial isopods includes hundreds of species, and their diets overlap heavily. Porcellio scaber, the rough woodlouse, and Porcellio laevis, the smooth woodlouse, are also commonly kept as pets and eat essentially the same things. Oniscus asellus, another common garden species, has similar habits. The differences between species are less about what they will eat and more about where they prefer to find it. Some species favor drier microhabitats and are more likely to be found under bark; others stay in wetter leaf litter. But put any of them in front of a rotting oak leaf, and they will eat it.
In the isopod-keeping hobby, keepers of rarer or more colorful species like Armadillidium klugii or Cubaris murina provide the same basic diet of leaf litter, calcium, and vegetable supplements. The main adjustment is to humidity and substrate rather than to the food itself. Species from tropical environments need wetter conditions and may benefit from more frequent offerings of soft fruit and protein, while Mediterranean species tolerate drier setups. But the core menu does not change.
Coprophagy and the Two-Part Molt
One of the stranger aspects of pill bug feeding is their relationship with their own waste. Pill bugs practice coprophagy, eating their own fecal pellets. This is not a sign of starvation or poor husbandry. Their droppings still contain partially digested plant matter and a dense community of gut microbes, and passing the material through a second time extracts more nutrients. It is a strategy shared with rabbits and some other herbivores, though the specifics differ.
The two-part molt is equally unusual. Most arthropods shed their exoskeleton all at once. Pill bugs shed the rear half first, wait a day or two, then shed the front half. After each half comes off, they eat it. This is the primary way they recycle the calcium carbonate in their exoskeleton, and it is the reason you rarely find shed pill bug skins lying around the way you find cicada or spider molts. In a pet enclosure, watching a pill bug go through this process is one of the more fascinating things you will see. The animal will look oddly two-toned for a day, with the freshly molted rear half appearing lighter than the un-molted front half.
For keepers, understanding this behavior means not panicking when you see a pill bug eating something whitish. It is almost certainly its own exoskeleton. It also reinforces why calcium supplementation matters: if the animal does not have enough calcium to build a strong new exoskeleton before the old one comes off, molting can fail, which is often fatal. A cuttlebone or a scattering of crushed eggshell in the enclosure quietly prevents this problem.
When Pill Bugs Become Garden Pests
Most of the time, pill bugs in a garden are beneficial. They break down mulch, dead leaves, and other organic debris, returning nutrients to the soil. But there are circumstances where their feeding habits cross the line into crop damage. Newly transplanted seedlings, strawberries resting on damp soil, and young bean or squash plants can suffer from pill bug grazing, especially in wet springs when populations are high and other decaying food is temporarily scarce.
The key variable is moisture. Pill bugs lose water quickly through their gill-like breathing structures, so they stick to damp environments. A garden bed that stays wet at the soil surface, with thick mulch right up against plant stems, is inviting pill bugs to camp out near your most vulnerable plants. Pulling mulch back a few inches from seedling stems, watering in the morning so the surface dries by evening, and elevating strawberries off the ground with straw or raised supports all reduce damage without harming the pill bugs or eliminating their composting benefits.
Chemical pesticides are rarely warranted for pill bugs and are often counterproductive, since they kill the same organisms that keep your soil alive. If a particular bed has a severe problem, a shallow dish sunk into the ground and filled with beer (the same trick used for slugs) will trap pill bugs overnight. But in most gardens, adjusting moisture and mulch placement is enough to shift pill bugs from nuisance back to ally.