Skip to content

Composting for Wildlife in Your Garden

A compost heap can be a home for slow worms, hedgehogs, grass snakes and toads. Here's how to run one that makes compost and helps wildlife too.

Last updated: 19 October 2026

Wooden open-bottomed compost bin in a UK garden surrounded by leaf litter and overgrown vegetation Wildlife
A compost heap is a warm, damp home for worms, woodlice, beetles and centipedes, and it shelters slow worms, toads, hedgehogs and grass snakes too. Grass snakes lay eggs in heaps in June and July, and the young hatch in August or early September. Hedgehogs sleep and hibernate in them, so poke a stick in gently before you fork. Run two heaps: one to use, one left alone for wildlife.
Who lives thereWorms, woodlice, beetles, slow worms
Grass snake eggsLaid June to July, hatch by September
Before forkingCheck for hedgehogs with a stick
Best setupTwo heaps: one to use, one left alone

Key takeaways

  • A compost heap is full of worms, woodlice, beetles and centipedes, which feed bigger animals
  • Grass snakes lay eggs in warm heaps in June and July, and they hatch in August or early September
  • Always poke a long stick in gently before turning, in case a hedgehog is asleep inside
  • Keep one heap you never turn as a year-round wildlife home
  • Bins with an open base let creatures crawl in from the soil
  • A leaf pile and a log stack nearby make the spot even better for wildlife

A compost heap is one of the best wildlife spots in a British garden. It’s warm, damp and full of food, so everything from worms to hedgehogs moves in. The Wildlife Trusts encourage home composting partly because the minibeasts in a heap feed hedgehogs and other animals.

This guide is about the wildlife side: who lives in your heap and how to look after them while still getting compost. For the nuts and bolts of making it, see our guide on how to make compost at home.

What lives in a compost heap?

An established heap is home to worms, woodlice, beetles, centipedes and millipedes. Slow worms, grass snakes, toads and hedgehogs use it too. The middle is warm, the edges are cool and damp, and there’s food everywhere, so different creatures find their own favourite spot.

Invertebrates: the clean-up crew

Most of the life in a heap is small. These are the creatures that turn your peelings and clippings into compost.

Brandling worms are the stars. They’re small, stripy and red, and they live in rotting plant matter rather than soil. A healthy heap holds thousands. They’re different from the earthworms in your borders and love the warm, damp middle of the heap.

Woodlice chew up tougher stuff like dead leaves, twigs and cardboard. You’ll find them in the cooler outer layers.

Beetles both tidy up and hunt. Ground beetles go after slugs at night. The devil’s coach horse, with its raised tail, is a fierce little hunter of grubs and small slugs.

Centipedes are the top hunters among the minibeasts. If you see them, your heap is well established and full of prey.

Millipedes are the vegetarian cousins. They munch rotting plant material and help break down tougher stems.

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

An open heap tucked in a quiet corner. Warm and damp, it’s just what slow worms and beetles like.

Slow worms

Slow worms are legless lizards, not snakes. They’re brilliant to have, because they eat slugs and snails. They warm up beside the heap and shelter inside it.

They give birth to live young in late summer, often in compost heaps. They breed slowly, so a lost garden population takes years to come back. Slow worms are protected by law from being killed or injured, so don’t handle them or move them.

Shiny coppery slow worm basking on old carpet on top of a garden compost heap

Slow worms bask on the warm top of the heap and eat slugs. Leave them be, as they’re protected and don’t move gardens well.

What should I do if I find slow worms in my compost?

Leave them be and gently cover them back over. Slow worms in your heap are good news. Put back anything you lifted so the spot stays warm and dark.

If you need compost, take it from another part of the heap or from your working bin. Slow worms often gather in groups, so use your hands or a trowel near them, not a fork. Never move them to another garden, as they rarely survive it. If you’re planning building work where slow worms live, get ecological advice first. Our guide to creating a wildlife garden has more on helping reptiles.

Grass snakes

Grass snakes are the only UK snake that lays eggs, and compost heaps make great nests. The warmth of the rotting material keeps the eggs cosy. Amphibian and Reptile Conservation says eggs are usually laid in June and July and hatch in August or early September.

The eggs are white and leathery. The babies look like tiny adults and head off on their own straight away. Grass snakes are harmless to people. They eat frogs, toads and newts, so gardens with wildlife ponds suit them well.

If you find eggs, cover them back up and leave them where they are. Leave a heap used by grass snakes alone from June until at least October, and ideally until the next spring.

Hedgehogs

Hedgehogs hibernate in compost heaps from November to March and nap in them by day in summer. A sleeping hedgehog curls into a tight ball deep inside and shouldn’t be disturbed.

That’s why checking before you turn compost really matters. A single jab of a fork can kill a hedgehog, or a whole nest of babies.

What should I do if I find a hedgehog in my compost heap?

Stop and cover it back up with the material you moved. A single adult will usually fix its nest or move on.

If you find a nest of babies, put the nesting material back and touch it as little as you can. Watch from a distance for the mother coming back, and keep people and pets away. If a hibernating hedgehog wakes, put out meaty cat or dog food and fresh water each night until it settles. If it’s hurt, out in daylight, or the babies seem abandoned, call a local hedgehog rescue or the British Hedgehog Preservation Society. Our guide to hedgehog-friendly gardens has more ideas, including hedgehog highways that link gardens together.

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

A slatted wooden bin in autumn. Leaves around the base make a cosy hedgehog bed for the winter.

Toads and frogs

Common toads shelter in the cool, damp base of a heap and hunt slugs and insects across it at night. Frogs turn up more often when there’s a garden pond nearby. Toads have become much scarcer in many places, so a heap really helps them. Our frog and toad guide has more ways to help.

Fungi and bacteria

Fungi and bacteria do most of the rotting. White threads running through the compost are fungi, and they’re a good sign. Bacteria make the heat that keeps a fresh heap warm in the middle.

Compost heap design for wildlife

A few small choices about where and how you build your heap make a big difference to who moves in.

Open-bottomed bins vs closed bins

Bins with an open base are much better for wildlife. Worms, beetles, slow worms and toads all come up from the soil below. Sealed tumbler bins keep rats out, but they keep everything else out too.

Wooden pallet bins are ideal, as the gaps let creatures in from every side. If you use a plastic “dalek” bin, stand it straight on bare soil with no base plate.

Two wooden pallet compost bins standing on bare soil with gaps for wildlife in a UK garden corner

Open bases and gappy pallet sides let worms, beetles, toads and slow worms move in from every direction.

Size and position

Bigger heaps stay warmer and give wildlife more room. Aim for at least 1m x 1m x 1m if you have the space.

Pick a sheltered spot with some sun. Deep shade keeps a heap cold, and full sun means you’ll need to water it in dry spells. A quiet corner where people rarely walk gives shy visitors like hedgehogs the confidence to settle.

Should a wildlife compost heap be in sun or shade?

For grass snakes and slow worms, give it sun for at least part of the day. Reptiles need warmth. Tall or scrubby plants and hedges nearby let snakes reach the heap without crossing open lawn.

Light, dappled shade suits toads, woodlice and worms, because the heap stays damp. If you have two heaps, put the wildlife one in the sunnier spot and the working one where it’s handiest. Either way, keep it moist. A dry heap stops rotting and is more likely to get ants and rats. An old piece of carpet or a tarpaulin on top holds in warmth and damp.

FeatureGood for wildlife becauseGood for compost because
Open-bottomed binWorms, toads and beetles get in from belowDrains well, soil life moves in
Slatted wooden sidesSlow worms and minibeasts can get inAir gets in, so it rots faster
At least 1m each wayStays warm, with cool and warm zonesBig enough to heat up
Sheltered spot with some sunWarmth for reptiles, cover for shy animalsRots faster when warm
Sitting on soilLinks to the life in the groundWorms move up into it
Two heapsOne quiet refugeOne heap to use
Log pile alongsideExtra shelter for beetles and toadsNothing directly, but a handy neighbour

The two-heap system

The best single thing you can do is run two heaps. One is your working heap: you add to it, turn it and dig out the compost. The other is left alone as a wildlife home.

The wildlife heap needs no looking after. Add to the top now and then, but never turn or fork it. That’s where hedgehogs hibernate, slow worms have their young and grass snakes lay eggs. You still get compost, and the wildlife gets somewhere safe.

Wildlife-friendly composting practices

Look before you fork, fit the work around the seasons and add a good mix of stuff. That way you get decent compost and keep the residents safe.

Check before turning

Always poke a long stick gently into the heap before you use a fork. Try a few spots and wait. If you feel something or hear rustling, stop. From November to March, assume a hedgehog could be asleep in there. Work in from the edges rather than plunging into the middle.

From June to early September, there may be grass snake eggs. If you find white, leathery eggs, cover them straight back up and leave that part alone until October.

Older man gently probing a compost heap with a long stick to check for hedgehogs before turning it

Probe gently in a few spots and wait before any fork goes in. From November to March, assume a hedgehog may be asleep inside.

Seasonal management

MonthWhat’s going onWhat to do
January to FebruaryHedgehogs hibernating, minibeasts quietLeave it alone. Add to the top only
March to AprilHedgehogs waking, slow worms coming outCheck carefully before turning
May to JuneGrass snakes looking for nest sitesKeep away from the base and middle
July to AugustGrass snake eggs in the heap, busy minibeastsDon’t turn any part with eggs
September to OctoberBaby snakes leaving, toads looking for winter bedsTake finished compost from the edges
November to DecemberHedgehogs settling in to hibernateStop turning. Cover the heap to keep it snug

Are ants in a compost heap a problem?

Ants mean the heap is too dry. They don’t harm anything else living there, but a dry heap stops rotting. Water it well or mix in fresh green stuff like grass clippings, and the ants usually move out. Turning helps too, once you’ve checked for hedgehogs, slow worms and eggs.

Never use ant powder or other insecticides on a wildlife heap. They kill the beetles, woodlice and worms that make the compost and feed hedgehogs, toads and birds.

What to add for wildlife diversity

A good mix makes more nooks and more food, so more creatures move in.

  • Grass clippings warm the heap and feed grubs, which feed beetles and centipedes
  • Woody prunings leave air pockets and tunnels for bigger creatures
  • Autumn leaves rot slowly and make cool, damp corners for toads and woodlice
  • Cardboard and paper soak up wet and help fungi grow
  • Fruit and veg scraps feed the worms

Leave out meat, dairy and cooked food. They bring rats rather than the wildlife you want. For the full list of what goes in, see our composting guide.

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

Up close, a working heap is busy with worms, woodlice and beetles turning scraps into crumbly compost.

Leaf mould as wildlife habitat

A leaf pile gives wildlife a cool, damp home the warm compost heap can’t. Pile autumn leaves into a wire mesh cage, or into black bin bags with a few holes punched in. They take 1 to 2 years to rot down.

Leaf piles shelter beetles, centipedes, woodlice and toads over winter, and hedgehogs nest in them too. Keep the pile in a quiet corner and leave it alone from November to March. When you use the finished leaf mould as mulch, take it from the top and edges, not the middle.

Log piles as companion habitat

A stack of logs beside your compost heap makes the whole corner far better for wildlife. Creatures move between the two all the time.

Logs suit different creatures as they rot. Fresh logs bring beetles that bore into wood. Half-rotten logs grow fungi and shelter woodlice and centipedes. Soft, crumbly old logs are perfect for hedgehogs to snuggle into.

Logs half buried in the soil are great for stag beetles. Their grubs spend several years underground eating rotting wood. Stag beetles live mainly in southern England, so a sunken log pile is a lovely addition there.

Stack logs loosely so there are gaps. Mix thin branches with thick chunks and keep the pile touching the ground. If your garden has clay soil, the damp around the logs is ideal for frogs and toads.

Loose log pile with half-buried rotting logs and fungi beside a compost heap for wildlife

Half-bury some logs in the soil for stag beetle grubs, and stack the rest loosely so toads and hedgehogs can tuck in.

Compost heap wildlife through the seasons

Who’s living in the heap changes through the year, so the safe times to work on it change too.

Spring (March to May)

The heap wakes up. Hedgehogs leave after hibernation, usually by mid-April. Slow worms start basking on the warm top, and the worms get busier as it warms up. This is the best time to turn your working heap, once you’ve checked for late sleepers.

Summer (June to August)

The busiest time. Grass snakes lay eggs in June and July. The heap is full of flies and beetles, and slow worms hunt slugs in the cool of the evening. Wrens and robins pop by to pick off insects. If you feed birds through the seasons, the heap is a handy natural top-up.

Autumn (September to November)

Baby grass snakes hatch and head off. Toads look for a winter bed at the base, and hedgehogs start scouting for hibernation spots from October. Add autumn leaves to the heap for extra cover. Turn less as it gets colder. Bats may hunt insects over the heap at dusk, and our bat-friendly gardening guide shows how to help them.

Winter (December to February)

The heap becomes a winter refuge. Hedgehogs hibernate deep inside, and the middle stays warmer than the air outside. Don’t turn it at all now. Add new material to the top only, and lay old carpet or cardboard on top for extra snugness. Our winter wildlife garden guide has more seasonal tips.

How compost heaps connect to the wider garden ecosystem

Your heap is one stop on a busy wildlife route. Animals move between it and the rest of the garden every day.

Hedgehogs wander from the heap to log piles and along hedgehog highways into the gardens next door. Slow worms hunt along walls and fences before heading back to rest. Beetles roam the whole garden at night and hide in the heap by day.

Put a heap together with a wildlife pond, log piles, a wildflower patch and native plants, and animals can live their whole lives in your garden. Frogs breed in the pond and shelter in the compost. Beetles hide in the logs and hunt on the heap.

A bug hotel near the compost gives solitary bees and lacewings somewhere to nest. Plants for butterflies and bees around the area give them food right next door.

Now your heap is helping wildlife, read our guide on creating a wildlife garden for the next step.

Frequently asked questions

Do grass snakes live in compost heaps?

Yes, they often use compost heaps as nests. Females lay eggs in warm, rotting material, usually in June and July, and the warmth keeps them cosy. The young hatch in August or early September. Grass snakes are harmless and protected by law.

Are grass snakes dangerous?

No, they’re harmless and very shy. They slither away from people. If picked up they may hiss or give off a nasty smell, so just leave them alone. They eat frogs, toads, newts and fish, and they don’t touch your plants.

How do I check compost for hedgehogs before turning?

Gently push a long stick into the heap first. If you feel something or hear shuffling, stop and leave it alone. From November to March, assume a hedgehog may be hibernating inside. Work in from the edges rather than pushing a fork straight into the middle.

Do compost heaps attract rats?

Rats come for cooked food, meat and dairy. A heap with just garden waste and raw veg peelings is far less tempting. If rats worry you, keep out bread, pasta, rice and anything cooked, and keep the heap damp, as rats prefer dry heaps.

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

Yes, but take it gently from the edges and top. Never dig into the middle, where animals may be sleeping. October is a good time, after young hedgehogs have left the nest and before adults hibernate. Grass snake eggs have hatched by then too.

How long before wildlife colonises a new compost heap?

Minibeasts arrive within days if the heap sits on soil. Worms, woodlice and beetles settle in over the first few weeks. Slow worms, hedgehogs and grass snakes are more likely to use a heap that’s been in place for a year or more.

Should I add a compost accelerator to a wildlife heap?

No need. A wildlife heap doesn’t have to rot fast, and peace and quiet matters more. Fresh grass clippings or a little manure do the same job anyway. Save any accelerator for your working heap.

Do compost bins work for wildlife or only open heaps?

Open heaps and wooden pallet bins are best. A plastic dalek bin works if it sits on bare soil with no base plate. Sealed tumbler bins give wildlife nothing. For the most visitors, go for an open wooden heap.

composting wildlife garden hedgehogs slow worms invertebrates biodiversity

By Garden UK Editorial Team

Our team produces practical UK gardening guidance from source research, contributor records and established horticultural practice. Editorial standards are overseen by Matt W.

About our editorial team · How we work

Stay in the garden

Seasonal tips, straight to your inbox

One email a month. What to plant, what to prune, what to watch out for. No spam.

Unsubscribe any time. We never share your email. See our privacy policy.