Maggots in the compost bin: good, bad or a moisture clue?
Maggots in a compost bin are normal. They point to exposed scraps or a wet top: bury scraps under browns, dry it out, keep meat out.

Finding maggots in your compost bin is normal. Plenty of bins and piles get them, and it isn’t a sign you’re doing it wrong. Flies find food scraps, and their maggots are part of how those scraps break down. They’re also a clue about what’s sitting on top of your bin, and here’s how to read it.
Quick fix
Whatever kind they are, the fix is the same. Do this every time:
- Bury new scraps under 2–4 inches (5–10 cm) of browns and keep the lid on.
Then check the bin:
- Wet like mud? Mix in at least a bucket of shredded cardboard for every bucket of scraps, more if it still drips. More in Compost too wet.
- Meat, fish or dairy went in? Take it out and leave it out. See what not to add.
Are maggots in compost bad?
Usually not, and some kinds actually help break scraps down. When you dig in, wear gloves, and wash your hands afterwards.
What are the maggots in my compost?
You don’t need a sure identification, because the fix is the same. Two things are worth knowing, though.
Smooth, white and pointed: housefly or blow fly maggots
These are smooth and creamy white, pointed at one end and blunt at the other, with no visible head. Housefly maggots grow to about ⅜ inch (1 cm). Flies lay their eggs on exposed fresh scraps, especially meat and fish, and on a wet, uncovered top layer or a countertop compost bin left open. Blow flies (bluebottles) lay theirs in clusters of a hundred or more, so a tight cluster in one spot can mark where something rich went in (step 3 below).
Big, segmented and lively: soldier fly larvae
Black soldier fly larvae are bigger. Young ones are gray-white, segmented, about 1 inch (2.5 cm) long and very active, so pale ones can be soldier fly too. Older ones flatten out, turn dark brown and grow tough-looking skin, and they often wriggle together in a mass. They’re common in North American bins. In the UK the species was only formally recorded in a 2022 paper, so maggots in a UK bin are more likely to be housefly or blow fly types.
Oregon State University Extension says soldier fly larvae “won’t harm you or the compost”. They’re a sign of a wet, food-rich bin. The same page suggests offering them to chickens or leaving them out for wild birds.
Maggots in the compost bin: what to do
- Bury, don’t drop. Pull back the top layer, put the new scraps in, and cover them with 2–4 inches (5–10 cm) of browns: dry leaves, shredded cardboard or straw. Keep the lid on, and cover any gaps or holes in the bin with fine mesh. Flies can’t lay eggs on what they can’t reach. If you use a countertop compost bin, empty it every couple of days.
- Dry out a wet top. Squeeze a handful from an inch or so (a few centimeters) down. It should feel like a wrung-out sponge. If it drips, mix in at least a bucket of shredded cardboard for every bucket of scraps, and keep going until a squeezed handful holds together without dripping. Over time, aim for the usual two or three parts browns to one part greens. The squeeze test and cardboard work the same way in a tumbler.
- If meat, fish or dairy went in, take it out. Wear gloves, and dig where any cluster of small white maggots is, since that’s often where it ended up. Then leave those foods out from now on.
Can you get rid of them completely?
Apart from fishing out any meat or dairy, you don’t need to dig the maggots out or pour anything on them. If the sight of them bothers you, Oregon State’s advice for a bin full of larvae is to turn the compost and mix in dry material. The ones already there may still turn into flies, but once nothing fresh is left uncovered, the next lot has nowhere to lay eggs. The mesh in step 1 helps too.
Soldier flies can’t be kept out of an open-air bin entirely, and they needn’t be. Oregon State says their larvae can’t survive above about 113°F (45°C). A cool home bin may never get that hot, and that’s fine: it still makes good compost. Housefly types thin out once nothing fresh is left exposed.
If that didn’t work
- Still soggy after the cardboard? Work through Compost too wet.
- New clusters of small white maggots keep appearing, even with scraps buried? Something rich is still going in, such as cooked food, meat scraps hidden in peelings, or pet food. Check what not to add.
- A smell alongside the maggots? Match it in why your compost smells.
- Rats, or small flies hovering over the bin? See rats, flies and ants.