Pill bugs breathe through modified gill-like structures on their undersides, but calling them simple “gills” undersells what evolution has done to these animals. While their aquatic crustacean relatives use feathery gills to pull dissolved oxygen from water, pill bugs in the family Armadillidiidae have transformed some of those same ancestral gill plates into air-breathing organs that researchers actually call “lungs.” The result is a respiratory system unlike anything found in insects or spiders, one that straddles the line between aquatic and terrestrial in ways that explain almost everything odd about pill bug behavior.
What Pill Bugs Actually Breathe With
Pill bugs belong to the order Isopoda, a group of crustaceans that includes thousands of aquatic species. The ones living under your flower pots are members of the suborder Oniscidea, the terrestrial isopods. Like their marine cousins, they carry flat, leaf-shaped appendages called pleopods on the underside of their abdomen. In aquatic isopods, these pleopods function as straightforward gills, exchanging gases with surrounding water. In pill bugs, those same pleopods still handle gas exchange, but many species have evolved internal pockets within them that work more like lungs.
In species like Armadillidium vulgare, the common pill bug found across North America and Europe, the outer branches of the first and second pairs of pleopods contain covered lung structures with multiple small openings called spiracles. These spiracles sit along the inner edge of each pleopod and allow air to enter a branching system of tubes inside the appendage, where oxygen diffuses across thin, moist membranes into the blood.1Arthropod Structure & Development. Eco-morphological studies on pleopodal lungs and cuticle in Armadillidium species (Crustacea, Isopoda, Oniscidea) Researchers classify these as “polyspiracular” lungs because they have several spiracular openings rather than just one. The lung region itself is divided into two zones: an inner respiratory area where gas exchange happens and an outer dust-repellent zone surrounding the spiracles that helps keep debris from clogging the airways.
The term scientists use for these internal tube systems is “pseudotracheae,” because they superficially resemble the tracheal tubes insects use for breathing. But the resemblance is coincidental. Insect tracheae evolved independently from a completely different body plan. Pill bug pseudotracheae evolved from crustacean gill tissue, which is why they still need to stay moist to function. The convergence is a striking example of two distantly related groups arriving at a similar engineering solution to the same problem: getting oxygen out of air.
Not All Terrestrial Isopods Breathe the Same Way
The roughly 3,700 known species of terrestrial isopods represent a spectrum of adaptation to life on land. At one end are species like Ligia, the sea slaters, which cling to rocky shorelines and still rely heavily on their pleopods functioning as conventional gills moistened by splashing waves. At the other end sit fully terrestrial species like Armadillidium and Porcellio, which have developed elaborate pleopodal lungs and can live far from any body of water. Most oniscid isopods are genuinely terrestrial in the sense of being completely independent of an aquatic environment.2Cambridge University Press / Biological Reviews. Nutrition in terrestrial isopods (Isopoda: Oniscidea): an evolutionary-ecological approach
Where a species sits on this spectrum determines how it breathes. Species without pleopodal lungs still use their pleopods as gas exchangers, but they depend on a thin film of water coating those surfaces to dissolve oxygen before it can cross into the blood. Species with fully developed lungs pull air directly into internal chambers. A review of respiratory evolution across animal groups notes that different gas exchangers, including skin, gills, tracheae, and lungs, can coexist within the same species, sometimes simultaneously.3Comprehensive Physiology. Evolution of Air Breathing: Oxygen Homeostasis and the Transitions from Water to Land and Sky Pill bugs are a case in point. Even species with well-developed lungs still exchange some gas across the wet outer surfaces of their pleopods, meaning they use both gill-type and lung-type respiration at the same time.
Why Pill Bugs Die When They Dry Out
This dual system explains why pill bugs are so obsessively tied to damp environments. Unlike insects, whose tracheal tubes are lined with a waxy cuticle that minimizes water loss, pill bug pleopods lack that kind of waterproofing. The gas-exchange surfaces need to remain moist for oxygen to dissolve and cross into the hemolymph (their version of blood, which contains copper-based hemocyanin rather than iron-based hemoglobin, giving it a faint blue tint when oxygenated). A pill bug in dry air loses water rapidly through its respiratory surfaces and through its relatively permeable exoskeleton.
This vulnerability shapes nearly every behavioral choice a pill bug makes. They are nocturnal. They aggregate under logs, stones, and leaf litter. They prefer soil with high moisture content. When you flip a board in your garden and see a cluster of pill bugs pressed together underneath, you are looking at animals managing a respiratory constraint that insects solved hundreds of millions of years ago. The pill bug’s solution is behavioral rather than anatomical: stay where it is wet.
Rolling Into a Ball Is Partly About Breathing
The signature move of Armadillidium vulgare, conglobation, is usually described as a defense against predators. A tightly rolled pill bug presents a hard, smooth sphere that many small predators cannot pry open. But research has shown that conglobation also serves a respiratory and water-balance function. When pill bugs roll up in dry conditions, their water-loss rate drops by about 35%, and their rate of carbon dioxide release drops by a similar amount.4PubMed Central. Conglobation in the pill bug, Armadillidium vulgare, as a water conservation mechanism
The mechanism is intuitive once you picture the anatomy. When a pill bug rolls into a ball, its pleopods are tucked inside the sphere, sealed away from the surrounding dry air. The trapped pocket of air quickly becomes humid from the animal’s own moisture, slowing the rate at which water evaporates off the gill and lung surfaces. It is essentially creating a tiny humid microclimate around its own respiratory organs. The effect is strongest in moderately dry conditions; at relative humidities above roughly 53%, conglobation no longer produced a significant difference in water loss in laboratory measurements.4PubMed Central. Conglobation in the pill bug, Armadillidium vulgare, as a water conservation mechanism At that humidity level, evaporation is already slow enough that the curling behavior adds little advantage.
This finding reframes conglobation as a multi-purpose behavior. Predator defense and water conservation are not mutually exclusive functions; evolution does not demand that a trait serve only one purpose. For a small, moisture-dependent crustacean living in leaf litter, the ability to seal off its respiratory surfaces from dry air is likely just as important as the ability to present a hard shell to a spider.
How Pill Bug Lungs Develop
Pill bugs do not hatch with fully formed lungs. The development is staged and surprisingly quick. In Porcellio scaber, a common rough woodlouse closely related to pill bugs, the lungs in the second pair of pleopods begin forming at the manca 1 stage, which is the earliest juvenile stage immediately after hatching. These lungs become functional by the manca 2 stage. The first pair of pleopods does not even appear until the manca 3 stage, and the lungs within them develop gradually, becoming operational only in post-manca juveniles.5Arthropod Structure & Development. Pleopodal lung development in a terrestrial isopod, Porcellio scaber (Oniscidea)
The process involves epithelial invaginations, where the outer cell layer of the pleopod folds inward to create the internal tubes and chambers that will become the lung. Researchers have suggested that these developmental mechanisms, involving both the infolding of tissue and the formation of new cuticle within the resulting cavities, were novel acquisitions during the evolutionary transition to land.5Arthropod Structure & Development. Pleopodal lung development in a terrestrial isopod, Porcellio scaber (Oniscidea) In other words, the gill-to-lung conversion was not just a matter of existing structures drying out and being repurposed. It required genuinely new biological instructions for building something that had not existed in the aquatic ancestors.
This staged development has a practical consequence for very young pill bugs. In their earliest hours and days of life, before the lungs are fully functional, juveniles are even more dependent on external moisture than adults are. Mother pill bugs brood their young in a fluid-filled pouch called a marsupium, and the tiny mancae that emerge are essentially transitioning from an aquatic environment (inside the pouch) to a terrestrial one, recapitulating in miniature the evolutionary journey their lineage took millions of years ago.
Pill Bugs Versus Sow Bugs
People often use “pill bug” and “sow bug” interchangeably, but the two groups differ in their respiratory hardware. True pill bugs (Armadillidium) can roll into a complete ball and have well-developed pleopodal lungs with multiple spiracles. Sow bugs (Porcellio, Oniscus, and others) tend to have flatter bodies, cannot roll into a tight sphere, and in some cases have less elaborate lung structures or rely more heavily on the gill-like outer surfaces of their pleopods.
The practical upshot is that sow bugs are generally more moisture-dependent than pill bugs. You will often find sow bugs in wetter microsites: directly under rotting wood, deep in compost, or in basement drains. Pill bugs tolerate slightly drier conditions, in part because their lungs are more efficient at extracting oxygen from air and their conglobation trick helps them conserve water when conditions turn dry. Both groups still require damp environments compared to insects, but the gradient between them is real and reflects genuine differences in respiratory anatomy.
Why Pill Bugs Cluster Together
If you have ever found a dense aggregation of pill bugs under a single rock, you have witnessed another water-conservation strategy tied to respiration. When dozens or hundreds of pill bugs press together, the collective mass reduces the surface-area-to-volume ratio of the group. Less total surface area is exposed to dry air, which slows water loss for each individual. The behavior is sometimes called aggregation, and while it also serves social and possibly pheromone-driven purposes, the moisture-retention effect is well documented in terrestrial isopods.
Aggregation sites are not random. Pill bugs select microhabitats based on humidity, temperature, and substrate moisture, and once a few individuals settle in a favorable spot, chemical cues in their feces and body secretions attract others. The result is that a single damp crevice can host a remarkably dense population, all of them sharing the microclimate that keeps their respiratory surfaces functional. If you disturb such a cluster and scatter the animals across a dry surface, you can watch them begin moving purposefully, seeking moisture with surprising urgency. They are not just uncomfortable; they are suffocating.
What Happens When You Keep Pill Bugs as Pets
Pill bugs have become popular in the exotic-pet and bioactive-terrarium hobby, where they serve as both cleanup crews (eating decaying plant material and mold) and as display animals in their own right. Understanding their respiratory biology is essential for keeping them alive. The single most common mistake new keepers make is letting the enclosure dry out. Because pill bugs breathe through structures that evolved from gills and still require moisture to exchange gas, a dry habitat is not merely stressful for them. It is lethal in the same way that removing water from a fish tank is lethal.
Successful keepers maintain a moisture gradient in the enclosure: one side stays consistently damp (often with sphagnum moss or moist coco coir), while the other side is allowed to be somewhat drier. This lets the animals choose the humidity level they need at any given time. Ventilation matters too. Completely sealed containers trap humidity but also trap carbon dioxide and ammonia; the goal is gentle airflow that does not dry out the substrate. Providing bark, cork, and leaf litter gives pill bugs surfaces to hide under, mimicking the microhabitats they seek in nature and helping them manage respiratory water loss through aggregation and shelter.
Breeding colonies are especially sensitive to humidity swings. Gravid females carrying eggs in their marsupium need consistent moisture, and the newly hatched mancae, whose lungs are still developing, can desiccate fatally within hours if conditions drop too dry. Keepers who mist once a day and call it done often lose entire broods. A substrate that holds moisture steadily, combined with a layer of decaying leaves, provides much more stable conditions than surface spraying alone.
The Evolutionary Puzzle of Crustaceans on Land
Pill bugs represent one of the most successful invasions of land by any crustacean lineage. Crabs, hermit crabs, and certain amphipods have also made partial transitions to terrestrial life, but none have diversified on land the way oniscid isopods have. The respiratory system is a big part of why. Crabs that venture onto land still return to the sea to wet their gill chambers. Coconut crabs have stiffened gill tissue that functions somewhat like a lung but still requires periodic moistening. Pill bugs, by contrast, have evolved a true air-breathing organ with internal chambers and spiracles, a system efficient enough to support a fully terrestrial life cycle with no need to return to water at all.
The pleopodal lung is considered one of the key innovations that enabled this success. By internalizing the gas-exchange surface and protecting it with spiracles and dust-repellent structures, pill bugs reduced water loss enough to colonize habitats ranging from Mediterranean scrublands to temperate forests to semi-arid deserts (where they are active only at night, in burrows). The diversity of about 3,700 described oniscid species worldwide speaks to how effective this adaptation has been. They are not just surviving on land; they are thriving, filling ecological roles as decomposers and nutrient cyclers in virtually every terrestrial ecosystem outside the polar regions.
Copper Blood and Oxygen Delivery
The respiratory story does not end at the pleopods. Once oxygen crosses the moist membranes of the lungs or gill surfaces, it enters the hemolymph, which circulates through an open circulatory system driven by a simple tubular heart in the dorsal (upper) part of the body. Pill bug hemolymph uses hemocyanin, a copper-containing protein, to carry oxygen. Hemocyanin is less efficient at binding oxygen than the hemoglobin found in vertebrate blood, but it works well enough for small, relatively inactive animals with modest metabolic demands.
The copper-based chemistry gives hemolymph a distinctive blue color when oxygenated, though in practice pill bug blood often looks more pale blue or colorless because the concentration of hemocyanin is low. This is one reason pill bugs cannot sustain high levels of activity for long. A pill bug fleeing a predator or crossing a dry patch of ground is burning through its oxygen supply quickly, and the hemocyanin in its blood cannot replenish it as fast as hemoglobin could. Their strategy is to avoid situations that demand sustained exertion, which dovetails neatly with their preference for staying put in damp, sheltered microhabitats where they rarely need to move far or fast.