Step 4 - Composting
How to Keep Rats Out of a Compost Bin
A compost bin does not attract rats. Meat, bread, cooked food and a dry warm cavity attract rats, and a bin is where people put all four.
Janet H. - the hands-on owner behind Janet Media Group.
Published
This page contains affiliate links. If you buy through them we may earn a commission at no cost to you, and it never decides what we recommend. How this site is funded.
Keep rats out of a compost bin by removing what they came for and closing the way in: no meat, fish, dairy, oils, bread or cooked food in the bin at all, half-inch galvanized hardware cloth under and around any ground-standing bin, and keep the contents damp and turned rather than dry and undisturbed. If you already have rodents, the reliable fix is a format change -- an enclosed tumbler raised off the ground has no ground contact and no cavity to nest in, and that ends the problem rather than managing it.
What rats actually want from a bin
- Calorie-dense food. Vegetable peelings are not worth a rat's effort. Cooked rice, bread, meat scraps, cheese and anything oily are, and they are the single biggest driver.
- A dry, warm, undisturbed cavity. A neglected bin full of dry material is excellent nesting habitat quite apart from the food. Rats will nest in a bin they are not even eating from.
- Easy access. A gap under a bin, a loose lid, a cracked panel or an open heap all count. A rat can get through a gap of around half an inch.
- Water nearby. Little you can do about this one, but it explains why some gardens have a problem and neighboring ones do not.
Remove the first two and the bin stops being interesting. That is the whole strategy, and it is more effective than anything you can buy.
The exclusion list, non-negotiable
- Never: meat, fish, bones, dairy, cheese, eggs (shells are fine), oils, fat, butter, salad dressing, cooked food of any kind, bread, pasta, rice.
- Fine: raw fruit and vegetable scraps, peelings, coffee grounds and filters, tea, crushed eggshells, garden trimmings, leaves, shredded cardboard and paper.
- Caution: large amounts of fruit in hot weather draws flies and, eventually, attention. Bury it under browns rather than leaving it on the surface.
- Bury every addition. Open a hole in the existing material, tip the scraps in, pull material back over them. Surface scraps are an invitation.
Home compost piles do not reach the temperatures needed to deal with meat, dairy and cooked food safely in any case, so this list is not just about rodents -- it is the same list in what to put in a compost bin for independent reasons.
Hardware that works
| Format | Rodent resistance | What to add |
|---|---|---|
| Enclosed tumbler on a frame | Very high -- no ground contact, no cavity | Nothing. This is the answer if you have a problem |
| Lidded static bin on soil | Moderate -- sealed above, open below | Half-inch hardware cloth under the base, turned up the sides |
| Expandable open bin | Low | Hardware cloth base plus a weighted lid; still not sealed |
| Open heap | None | Not fixable. Change format or site it far away |
| Worm bin, indoors | Not applicable | Keep the lid on and do not overfeed |
The hardware cloth detail matters: half-inch galvanized mesh, not chicken wire. Chicken wire has a hexagonal mesh typically an inch or more across and rodents pass through it easily. Cut the mesh to the bin footprint plus a few inches, lay it down first, then stand the bin on it and turn the surplus up the inside of the walls so there is no gap at the junction.
Quick picks
| # | Product | Best for | Score | Price |
|---|---|---|---|---|
| 1 | ![]() Top pickFCMP Outdoor IM4000 Tumbling ComposterDual chamber, roughly 37 gal total | Most backyards | 9.1 | Check price on Amazon |
| 2 | ![]() Envirocycle ComposterTumbler drum on a liquid-collecting base | Patios and small yards | 8.0 | $349.99 - View on Amazon |
| 3 | ![]() Redmon Green Culture 65-Gallon Compost Bin65 gal enclosed bin with lid and access doors | A lidded static bin | 8.1 | $69.99 - View on Amazon |
#ad We may earn a commission - Price as of October 11, 2026
Scores are our own editorial judgment, formed from published specifications and independent sources. They are not aggregated customer ratings, and they are not the result of hands-on testing, which we do not currently do. See how we choose.
Moisture and turning, the two free fixes
A correctly managed bin is damp -- like a wrung-out sponge -- and that alone makes it poor nesting material. A bin that has gone dry and matted is comfortable, and a bin nobody opens for two months is undisturbed. Turning the contents every week or two does more to discourage nesting than any deterrent product, and it speeds up the composting at the same time.
If the contents are dry, add water and greens; if they are sodden, add browns and mix. The same balance that makes good compost makes an unwelcoming bin. How to use a compost bin covers the turning and harvesting routine.
What does not work
Ultrasonic repellers, peppermint oil, used cat litter and the various household deterrents circulated online do not reliably clear rodents from a food source, and some of them -- cat litter especially -- should not go anywhere near a bin you intend to use on food crops. Poison bait near a compost bin is worse than useless: it risks pets, wildlife and children, and it does nothing about the reason the rats came.
Equally, do not stop composting. Kitchen scraps in a garbage can are not less attractive to rodents than kitchen scraps in a bin, and a municipal bin sitting outside the back door is closer to your house.
Siting, which helps more than it should
Away from fences, walls, sheds and dense cover, because rodents travel along edges and under cover rather than across open ground. A bin standing clear in the open with a mown gap around it is visited far less than one tucked behind a shed. On a hard surface rather than long grass if you have the option. And not directly against the house.
None of that substitutes for the food list and the mesh, but it is free. Between the four measures -- no cooked food, buried additions, hardware cloth or an enclosed format, and regular turning -- a domestic compost bin is simply not a rodent problem, which is why extension guidance treats home composting as compatible with ordinary urban gardens.
Common questions
Do compost bins attract rats?
Compost does not; the food people add to it does. Meat, fish, dairy, oils, bread and cooked food are what make a bin worth a rat's attention, along with a dry undisturbed cavity to nest in. A bin taking only raw fruit and vegetable scraps, kept damp and turned, is not an attractant.
How do I rat-proof a compost bin?
Keep all meat, dairy, oils, bread and cooked food out, bury every addition under existing material, lay half-inch galvanized hardware cloth under the bin and turn it up the inside walls, and turn the contents every week or two. An enclosed tumbler raised off the ground needs none of this -- it has no way in.
Will chicken wire keep rats out of a compost bin?
No. Chicken wire mesh is typically an inch or more across and rodents pass through it easily. Use half-inch galvanized hardware cloth instead, cut larger than the footprint so you can turn the surplus up the inside of the walls with no gap at the junction.
What compost bin is best if I already have rats?
An enclosed tumbler on a frame. It has no ground contact, no cavity at the base and a sealed drum, which removes both the access and the nesting site rather than managing them. It is the one format change that reliably ends an existing problem.
Should I stop composting if I have rats?
No. Kitchen scraps in a garbage can are no less attractive, and that can is usually closer to the house. Fix the food list, add mesh or change format, and keep the bin damp and turned. Do not use poison bait near a bin whose output goes on food crops.
Sources
Factual claims on this page are backed by the published sources below, and product specifications are the manufacturers’ own. Where a figure is not published, we say so rather than estimating it.


