Skip to content
Wildlife | | 13 min read

Composting for Wildlife in Your Garden

Compost heaps support slow worms, hedgehogs, grass snakes, and hundreds of invertebrates. Learn wildlife-friendly composting practices for UK gardens.

A compost heap supports over 100 invertebrate species and provides habitat for slow worms, grass snakes, hedgehogs, common toads, and fungi. Grass snakes lay 10-40 eggs in warm compost between June and July, needing temperatures of 21-28C for incubation. UK surveys show hedgehogs use compost heaps as hibernation sites from November to March. Keeping one undisturbed heap year-round creates a permanent wildlife refuge alongside your working composting system.
Invertebrates100+ species in a single heap
Grass Snake Eggs10-40 laid June-July at 21-28C
Safety Checkprobe for hedgehogs before forking
Best Setup2-heap system: active + wildlife

Key takeaways

  • Compost heaps support over 100 invertebrate species including beetles, worms, woodlice, and centipedes
  • Grass snakes lay 10-40 eggs in warm compost heaps between June and July
  • Always check for hedgehogs with a long stick before turning or forking compost
  • Keep one permanent undisturbed heap as a dedicated wildlife habitat year-round
  • Open-bottomed bins allow ground-dwelling creatures to enter from below
  • Leaf mould piles and log stacks beside the compost heap multiply wildlife value
Wooden open-bottomed compost bin in a UK garden surrounded by leaf litter and overgrown vegetation

A compost heap is one of the richest wildlife habitats in any British garden. While most gardeners think of composting as a way to recycle waste and improve soil, the heap itself becomes a living ecosystem. Warm, moist, and full of food, it attracts creatures from every level of the food chain. The Wildlife Trusts recommend composting as one of the simplest ways to support garden biodiversity.

This guide focuses on the wildlife that lives in and around compost heaps, and how to manage your composting to support them. For the practical side of making compost, see our full guide on how to make compost at home.

What lives in a compost heap?

A mature compost heap supports over 100 invertebrate species alongside several reptile and mammal residents. The decomposition process creates distinct temperature zones, moisture gradients, and food sources that different creatures exploit.

Invertebrates: the engine room

The bulk of compost heap wildlife is invertebrate. These are the creatures doing the actual work of decomposition. Without them, your garden waste would sit unchanged for years.

Brandling worms (Eisenia fetida) are the stars. These small, stripy red worms thrive in rotting vegetation and can process their own body weight in organic matter daily. A healthy compost heap contains thousands. They are different from common earthworms and prefer the warm, acidic conditions inside the heap.

Woodlice break down woody material that worms cannot handle. They shred dead leaves, twigs, and cardboard into smaller pieces, increasing the surface area for bacteria and fungi. Seven woodlice species are common in UK gardens. You will find them in the outer, cooler layers of the heap.

Beetles are both decomposers and predators within the heap. Ground beetles hunt slugs and other invertebrates on the compost surface at night. Rove beetles patrol the heap interior. Devil’s coach horse beetles, with their distinctive raised tail, are fierce predators of fly larvae and small slugs.

Centipedes are the top invertebrate predators in the heap. They hunt worms, woodlice, and insects through the compost tunnels. Their presence indicates a healthy, established ecosystem with plenty of prey.

Millipedes are vegetarian counterparts to centipedes. They feed on decaying plant material and help break down tougher stems and roots. The flat-backed millipede Polydesmus angustus is the most common species in UK compost heaps.

Composting for wildlife with an open heap providing habitat for slow worms in a UK garden

An open compost heap in a UK garden corner — the warm, moist conditions attract slow worms, beetles, and dozens of invertebrate species.

Slow worms

Slow worms are legless lizards, not snakes. They are one of the compost heap’s most valuable residents. A single slow worm eats hundreds of slugs per year, making them a gardener’s best friend. They bask on the warm surface of compost heaps in the morning and retreat inside to hunt.

Slow worms give birth to live young in late summer, often choosing compost heaps as birthing sites. They can live for over 20 years. Populations are declining across the UK due to habitat loss, and gardens with compost heaps are increasingly important refuges. They are protected under the Wildlife and Countryside Act 1981. Never handle or relocate them. Learn more about supporting reptiles in our guide to creating a wildlife garden.

Grass snakes

Grass snakes are the only UK snake that lays eggs, and compost heaps are their preferred nest sites. The heat generated by decomposition maintains the 21-28C temperature needed for incubation. Females lay clutches of 10-40 eggs between June and July, often communally. Multiple females may use the same compost heap.

The eggs are white, leathery, and roughly 2.5cm long. They hatch in August and September. Hatchlings are just 15cm and immediately independent. Grass snakes are non-venomous and completely harmless to humans. They eat frogs, toads, and newts, so gardens with wildlife ponds are especially attractive to them.

If you find grass snake eggs in your compost, leave them undisturbed. Do not move the eggs. Do not turn that section of the heap until October at the earliest.

Hedgehogs

Hedgehogs use compost heaps as hibernation sites from November to March and as daytime sleeping spots during the active season. The insulating warmth and shelter make compost heaps attractive alternatives to purpose-built hedgehog houses. A hibernating hedgehog curls into a tight ball deep within the heap and should not be disturbed.

This is why checking for hedgehogs before turning compost is critical. Every year, hedgehogs are injured or killed by garden forks plunged into heaps. See our dedicated guide to hedgehog-friendly gardens for more protective measures, including hedgehog highways that connect gardens.

Composting for wildlife with a hedgehog nesting at the base of a wooden compost bin

A wooden slatted compost bin in autumn — leaf litter at the base provides perfect hedgehog nesting material from November to March.

Toads and frogs

Common toads shelter in cool, damp areas at the base of compost heaps. They hunt slugs and insects on the compost surface at night. Frogs are less common in dry heaps but frequent compost areas near garden ponds. Both species are declining in the UK, and garden habitats are increasingly important. Our frog and toad guide covers how to support amphibians throughout your garden.

Fungi and bacteria

The invisible majority. Fungi and bacteria perform 80-90% of decomposition in a compost heap. Fungal threads (mycelium) spread through the heap, breaking down lignin and cellulose that nothing else can digest. You will see white mycelium threads when you turn the compost. This is healthy. Bacteria generate the heat that makes compost heaps warm, sometimes reaching 60-70C in the centre of an active heap.

Compost heap design for wildlife

How you build and position your compost heap directly affects which wildlife colonises it. Small changes to standard composting practice make a significant difference.

Open-bottomed bins vs closed bins

Open-bottomed bins are far better for wildlife. Creatures enter from the soil below. Worms, beetles, slow worms, and toads all access the heap from ground level. Sealed plastic tumbler bins are rodent-proof but wildlife-proof too. They work well for fast composting but offer zero habitat value.

Wooden pallet bins are ideal. The gaps between slats allow access from all sides. The open base connects directly to the soil ecosystem. If you use a plastic dalek bin, ensure it sits directly on bare earth with no base plate.

Size and position

Larger heaps retain heat better and provide more diverse habitat zones. A minimum size of 1m x 1m x 1m gives enough volume for meaningful decomposition heat. Bigger is better for wildlife.

Position the heap in a partly shaded, sheltered spot. Full sun dries the heap too quickly. Deep shade keeps it too cold. A spot against a fence or wall, shaded by a tree for part of the day, is ideal. Quiet corners where humans rarely walk give shy creatures like hedgehogs and slow worms confidence to settle.

Design featureWildlife benefitComposting benefit
Open-bottomed binAllows ground access for worms, toads, beetlesBetter drainage, soil organisms seed the heap
Wooden slatted sidesEntry points for slow worms and invertebratesGood airflow speeds decomposition
Minimum 1m x 1m x 1mRetains heat, diverse temperature zonesEfficient hot composting possible
Partly shaded positionPrevents drying, suits moisture-loving speciesEven moisture through the heap
Direct soil contactConnects to soil food webEarthworms migrate up into the heap
Two-heap systemOne undisturbed wildlife refugeOne active heap for gardening needs
Log pile alongsideExtra shelter for beetles and amphibiansNone directly, but companion habitat

The two-heap system

The single best thing you can do for compost heap wildlife is run two heaps. One is your active working heap. You add waste, turn it, and harvest finished compost from it. The second sits permanently undisturbed as a dedicated wildlife habitat.

The wildlife heap does not need managing. Let it settle, cool, and become colonised over years. Add material to the top occasionally but never turn or fork it. This is where hedgehogs hibernate, slow worms breed, and grass snakes lay eggs. The active heap gives you usable compost. The wildlife heap gives your garden a functioning ecosystem.

Wildlife-friendly composting practices

Standard composting advice can conflict with wildlife welfare. These practices let you make good compost while protecting the creatures that live in it.

Check before turning

Always probe the heap with a long stick before using a fork. Push it gently into several spots and wait. If you feel resistance or hear movement, stop. During winter (November to March), assume hedgehogs may be hibernating. Fork from the edges inward rather than plunging directly into the centre.

Between April and September, grass snake eggs may be present. If you find white, leathery eggs, re-cover them immediately and leave that section alone until October.

Seasonal management

MonthWildlife activityRecommended action
January-FebruaryHedgehogs hibernating, invertebrates dormantDo not disturb. Add material to top only
March-AprilHedgehogs waking, slow worms emergingCheck carefully before any turning
May-JuneGrass snakes seeking nest sites, breeding invertebratesMinimise disturbance to base and centre
July-AugustGrass snake eggs incubating, peak invertebrate activityDo not turn sections with eggs
September-OctoberHatchlings emerging, toads seeking winter shelterHarvest finished compost from edges
November-DecemberHedgehogs entering hibernationStop turning completely. Insulate the heap

What to add for wildlife diversity

A varied compost heap supports more species. Mix your inputs to create different microhabitats within the heap.

  • Grass clippings — generate heat, attract fly larvae, which feed beetles and centipedes
  • Woody prunings — create air pockets and shelter tunnels for larger creatures
  • Autumn leaves — slow-rotting, creating cool damp zones favoured by toads and woodlice
  • Cardboard and paper — absorb moisture, create structure, host fungal growth
  • Fruit and vegetable scraps — feed worms and fruit flies, attracting predatory beetles

Avoid adding meat, dairy, or cooked food. These attract rats rather than the wildlife you want. For a full list of what to compost, see our composting guide.

Composting for wildlife close-up showing beetles, woodlice, and earthworms in active compost

A close-up of active compost teeming with life — earthworms, woodlice, and beetles break down organic matter into rich humus.

Leaf mould as wildlife habitat

Leaf mould deserves its own section. Collect autumn leaves and stack them in a wire mesh cage or black bin bags with holes punched in them. Leaf mould takes 1-2 years to break down, much slower than compost. This slow decomposition creates a cool, moist, fungus-rich habitat distinct from the warm compost heap.

Leaf mould piles are particularly important for beetle larvae. Stag beetle larvae spend 3-5 years feeding on decaying wood and leaf litter before pupating. The UK stag beetle population has declined significantly, and garden leaf mould piles provide vital breeding habitat. They are most common in southern England but found as far north as Yorkshire.

Hedgehogs also nest in leaf piles. Keep leaf mould in a quiet corner and avoid disturbing it between November and March. When you do use finished leaf mould as mulch or soil conditioner, take from the top and edges rather than digging into the centre.

Log piles as companion habitat

Place a stack of logs next to your compost heap and you double its wildlife value. Log piles and compost heaps together create a connected habitat corridor that supports creatures through their entire life cycles.

Logs host different organisms at different stages of decay. Fresh logs attract bark beetles and wood-boring insects. Partly rotted logs support fungi, woodlice, and centipedes. Fully decayed logs crumble into a soft material that hedgehogs burrow into.

Stack logs loosely to create gaps and cavities. Use a mix of sizes from thin branches to thick trunks. Leave the pile in contact with the ground. Native hardwoods like oak, birch, and ash decay at different rates, providing varied habitat over many years. If your garden has clay soil, the damp conditions around log piles create ideal habitat for amphibians.

Compost heap wildlife through the seasons

Spring (March-May)

The heap stirs back to life. Hedgehogs emerge from hibernation and leave the heap, usually by mid-April. Slow worms begin basking on the warm surface. Worm activity increases as temperatures rise. Early butterflies may bask on the dark surface of the heap. This is the best time to turn your active heap, after checking thoroughly for lingering hibernators.

Summer (June-August)

Peak activity. Grass snakes lay eggs in June-July. The heap buzzes with flies, beetles, and other invertebrates. Slow worms hunt slugs in the cool of evening. Birds visit the heap surface to pick off insects. Wrens and robins are regular visitors. If you are feeding birds seasonally, the compost heap provides a natural supplement to feeder food.

Autumn (September-November)

Grass snake hatchlings emerge and disperse. Toads seek winter shelter at the base. Hedgehogs begin scouting hibernation sites from October. Add autumn leaves to the heap — they provide insulation and future leaf mould habitat. Reduce turning as temperatures drop. Bats may hunt insects above the heap at dusk. Learn about bat-friendly gardening for more on supporting these nocturnal hunters.

Winter (December-February)

The heap becomes a survival refuge. Hedgehogs hibernate deep inside. Invertebrate activity slows but does not stop. The centre of a large heap stays surprisingly warm, even in freezing weather. Do not turn the heap at all during this period. Add new material to the top only. A sheet of old carpet or cardboard on top provides extra insulation for hibernating creatures. For more seasonal wildlife tips, see our winter wildlife garden guide.

How compost heaps connect to the wider garden ecosystem

A compost heap is not an isolated habitat. It is a hub in a network of garden ecosystems. Creatures move between the heap and other features daily.

Hedgehogs patrol between the compost heap, log piles, and hedgehog highways connecting to neighbouring gardens. Slow worms hunt along the bases of walls and fences before returning to the heap to rest. Beetles range across the entire garden at night, using the heap as a daytime refuge.

By combining a compost heap with a wildlife pond, log piles, a wildflower area, and native planting, you create a garden where creatures can complete their entire life cycles. Frogs breed in the pond and shelter in the compost. Beetles pupate in log piles and hunt on the compost surface. The heap is the warm heart of a wildlife garden.

Building a bug hotel near your compost area gives solitary bees and lacewings additional nesting options. Plants that attract butterflies and bees around the compost area create foraging habitat adjacent to the shelter the heap provides.

Why we recommend a wooden pallet bin as your wildlife compost heap: After 30 years of managing compost systems, an open wooden pallet bin consistently attracts slow worms, hedgehogs, and grass snakes faster than any enclosed system. In my current garden, slow worms colonised a new pallet bin within one season. The slatted sides allow entry at every height, and the open base connects directly to the soil ecosystem below — conditions a plastic tumbler bin simply cannot replicate.

Now you’ve mastered composting for wildlife, read our guide on creating a wildlife garden for the next step in building a garden ecosystem.

Frequently asked questions

Do compost heaps attract rats?

Rats visit compost heaps that contain cooked food, meat, or dairy. A heap with only garden waste and raw vegetable scraps rarely attracts rats. If rats are a concern, use a sealed bin with a solid base and avoid adding bread, pasta, rice, or any cooked food.

Can I use compost from a wildlife heap on my garden?

Yes, but harvest it carefully. Take finished compost from the outer edges and top layer only. Never dig into the centre where animals may be sheltering. The best time to harvest is April or September, outside hibernation and egg-incubation periods.

How long before wildlife colonises a new compost heap?

Invertebrates arrive within days. Worms, woodlice, and beetles find a new heap within the first week if it sits on bare soil. Slow worms may take a year to discover it. Hedgehogs and grass snakes typically find established heaps that are at least one to two years old with stable temperatures.

Is it safe to have grass snakes in my garden?

Grass snakes are completely harmless to humans. They are non-venomous and extremely shy. They flee from any disturbance. Their diet of frogs, toads, and newts means they rarely affect garden plants. They are a protected species and a sign of a healthy garden ecosystem.

Should I add a compost accelerator for wildlife?

No. Commercial accelerators speed decomposition but create hostile conditions for larger wildlife. The high temperatures and chemical additives are bad for hedgehogs and reptiles. Let your wildlife heap decompose naturally at its own pace. Your active composting heap can use accelerators if you wish.

Do compost bins work for wildlife or only open heaps?

Open heaps and wooden pallet bins are best for wildlife. Standard plastic dalek bins work if they sit on bare soil and have no base plate. Sealed tumbler bins offer no wildlife habitat at all. For the widest range of species, an open wooden heap is ideal.

For further reading on supporting garden wildlife through habitat creation, the Royal Horticultural Society’s wildlife gardening pages cover the science behind garden biodiversity and offer practical advice for every garden size.

composting wildlife garden hedgehogs slow worms invertebrates biodiversity
LA

Lawrie Ashfield

Lawrie has been gardening in the West Midlands for over 30 years. He grows his own veg using no-dig methods, keeps a wildlife-friendly garden, and writes practical advice based on real UK growing conditions.