Rats in the Compost Bin: Fixes That Keep the Compost
Rats in a compost bin are there for food scraps and a warm, undisturbed nest, so stop adding food, trap at the burrows beside the bin, then rebuild it with 1/4 inch mesh underneath and keep the pile hot, moist and turned. You do not have to give up composting. Cornell’s Waste Management Institute says good compost management deters pests and speeds decomposition, and Oregon State Extension calls a hot pile the first and most important practice.
Problem, fix and who says so
| Problem | Fix | Source |
|---|---|---|
| Burrows under the bin | Lay 1/4 to 1/2 inch galvanised hardware cloth over 3 to 4 inches of coarse gravel under the base, or set the bin on mesh-covered pallets | Cornell Waste Management Institute |
| Holes chewed in a plastic bin | Cover vents with wire mesh; rats usually start at the vents | Cornell; UC IPM warns rats gnaw plastic |
| Exposed food on top | Put scraps in the centre and cover with leaves, grass, wood chips, soil or sawdust | Cornell |
| Meat, dairy or oily food in the pile | Leave them out entirely | Cornell; Oregon State; UC IPM |
| Dry, undisturbed pile | Turn it and keep it as damp as a wrung-out sponge | Cornell; Washington Department of Fish and Wildlife; Oregon State |
| Cold pile with uneaten food | Build a hot pile of 0.5 to 1 cubic yard reaching 130 to 135°F | Oregon State Extension |
| Rats keep returning | Use a closed tumbler raised off the ground, or stop food scraps for a while | Oregon State; City of Boston; Cornell |
| Bin beside a woodpile, shed or feeder | Move it into the open, away from other food and nesting cover | Cornell; City of Boston |
Compiled by The Pest Control Brief from the sources named in each row.
Does compost cause rats?
Compost does not create rats, but a badly run bin feeds and houses ones already nearby. Cornell’s fact sheet says rodents are attracted to compost piles “both as a source of food and a place to live”, and cites a central New York study in which pests, including rats, were the third most common composting obstacle after lack of space and lack of knowledge. UC IPM says rats occasionally burrow beneath or around compost piles, particularly if people add meat, fish, eggs or eggshells.
Cornell also notes that animals often feed at bird feeders, pet bowls, bins and fruit trees and use a nearby compost bin as a cosy bed, so what attracts rats to a yard matters as much as the bin.
A feeder within sight of the bin is its own problem, covered in rats under the bird feeder and whether to keep feeding.
Signs they are living in it, not just visiting
- Burrows beside or under the bin. Boston’s urban agriculture guidance puts rat burrow holes at around 2 to 4 inches wide.
- Chewed vents or corners on a plastic bin, which Cornell says is where rats usually start.
- Droppings that look like dark brown or black rice, as Boston describes them, on the lid or around the base.
Holes elsewhere in the lawn or under a shed suggest a wider colony; our backyard rat burrow key and yard audit helps decide whether one rat is visiting or a colony has settled.
How can I get rid of rats in my compost bin?
- Stop adding food scraps. Cornell says that where a problem persists it may be necessary to avoid food scraps altogether, and Washington’s wildlife department says not to put food of any kind in open compost piles. Garden waste can keep going in.
- Trap at the burrows, not in the pile. Set rat-sized snap traps at burrow entrances and along the path to the bin. UC IPM says that where children, pets or birds might reach traps outdoors, set them inside boxes or stations, and that trapping at night reduces contact with birds. CDC advises against glue traps and live traps.
- Disturb the nest. Once catches slow, turn the pile with a fork and wet it. Cornell says turning and keeping the pile moist discourages animals looking for a dry, undisturbed bed.
- Rebuild the defences. Empty and reset the bin on a mesh base, cover vents and check the lid fits tightly.
- Restart food scraps carefully. Bury them in the centre and cover them, and keep out the items in the next table.
To get rid of rats in a compost bin without opening it, start with steps 1 and 2: no fresh food, and traps at the burrow entrances. Baits are a last resort outdoors and must be used only as the label directs, in tamper-resistant stations; our step-by-step guide to how to get rid of rats covers when bait makes sense and when it does not.
What to leave out, source by source
| Item | Cornell | Oregon State | UC IPM | Boston |
|---|---|---|---|---|
| Meat and chicken | Leave out | Leave out | Leave out | Leave out |
| Fish | Leave out | Leave out | Leave out | Not named |
| Dairy, cheese | Leave out | Leave out | Not named | Leave out |
| Oils, fat, grease | Leave out | Leave out | Not named | Leave out |
| Bread and grains | Not named | Leave out | Not named | Not named |
| Bones | Not named | Leave out | Not named | Not named |
| Eggs and eggshells | Mixed: some find shells attract, others do not | Not named | Named as an attractant | Not named |
| Oily or seasoned leftovers | Leave out | Not named | Not named | Not named |
Compiled by The Pest Control Brief from Cornell Waste Management Institute (2005), Oregon State University Extension (EM 9475 and its compost troubleshooting guidance), UC IPM Pest Notes: Rats and the City of Boston.
Do eggshells in compost attract rats? The sources split, as the table shows. If rats have already found the bin, leaving shells out costs little.
A bin rats cannot use
Three designs come up repeatedly. A closed tumbler on a stand, turned often (see the FAQ below). A wire bin: Cornell suggests building one from half inch hardware cloth or welded wire. A solid bin on mesh: Oregon State describes a wooden or plastic bin with 1/4 inch hardware cloth on the bottom to deter rats, mice and raccoons. Cornell adds that a tight-fitting lid is essential.
Mesh is the part people get wrong. UC IPM notes rats can gnaw through plastic, foam and wood, so the mesh must be metal hardware cloth or welded wire. The mesh chart above shows why 1/4 inch is the safe choice if mice matter too, and which rodent exclusion materials stop gnawing compares hardware cloth with the alternatives.
Keep it hot, wet and turned
Oregon State’s composting specialist says a pile should reach 130 to 135°F to kill weed seeds and many pathogens, needs about 0.5 to 1 cubic yard of fresh material to heat within a week, and should be kept at 60 to 65 per cent moisture, damp like a wrung-out sponge. An Oregon State extension answer to a reader with rats in a plastic bin was blunt: exclusion alone will not succeed, because a cold pile still holds food. Cornell advises turning when the pile exceeds 140°F and warns that above 160°F it can sterilise itself.
Is the compost still usable?
We found no extension guidance written specifically for compost that rats have lived in, so this is the general hygiene the sources give. UC IPM advises disposable gloves for dead rats; Cornell’s composting safety fact sheet stresses hand washing and dust masks in dry, dusty conditions. Another hot cycle before the compost goes on vegetable beds is a cautious step, given Oregon State’s point that 130 to 135°F kills many pathogens. Anyone unwell after contact should speak to a doctor; the real risks of rats, ranked sets out which diseases matter.
Mice in the compost bin
ICWDM sets the seal threshold at 1/4 inch for house mice against 1/2 inch for rats, so a half inch wire bin will not stop mice. Use 1/4 inch mesh, and see how to get rid of mice if they have moved from the bin to the shed or house.
What do rats hate the most in the garden?
Disturbance and lack of cover. UC IPM says no repellents have been found to solve a rat problem for more than a very short time. Cornell mentions cayenne pepper around the pile only as an often-repeated bit of advice, without evidence. A pile that is turned, kept moist and sited in the open with no woodpile or dense planting beside it is the least attractive option. Our page on which scents rats are said to hate and what published tests found covers peppermint, ammonia and the rest.
What is a rat’s biggest enemy?
Washington’s wildlife department lists owls, hawks, foxes, coyotes and weasels as rat predators, with snakes eating young rats. It adds that rats are also killed by vehicles, traps, poisons and other rats, and that a cat may kill a young rat but after one experience with an adult often prefers easier prey. Removing food and cover does more than predators. Poultry feed is a common reason rats stay, covered in rats in the chicken coop and how to protect the flock.
What causes rats to suddenly appear?
Usually a new food source or a disturbance nearby: a compost bin that started taking kitchen scraps, a fruit crop, outdoor pet feeding or building work. If trapping and bin repairs do not stop sightings within a few weeks, a professional inspection of the whole property is worth it; our rat exterminator cost guide lists a published $350 to $550 for a one-visit yard job (Fixr), an estimate rather than a measured price.
Frequently asked questions
Can rats live in compost bins?
Yes. Cornell says rodents use compost piles as a food source and a place to live, and UC IPM notes rats burrow beneath or around piles. Dry, undisturbed lower layers, chewable plastic vents and no mesh base make the easiest nest; turning, wetting and a mesh base remove it.
Should I stop composting if I have rats?
Stop adding food scraps for a while, not composting altogether. Cornell says it may be necessary to avoid food scraps where a problem persists, and Washington’s wildlife department says no food in open piles. Garden waste can still go in. Restart kitchen scraps once traps stop catching and the bin has a mesh base, buried in the centre of the pile.
What size mesh keeps rats out of a compost bin?
Cornell recommends 1/4 to 1/2 inch galvanised hardware cloth under and around the bin, and Oregon State describes 1/4 inch on the bottom. Half inch welded mesh stops rats; 1/4 inch also stops mice, since ICWDM sets the mouse threshold at 1/4 inch.
Do compost tumblers stop rats?
They help when kept closed and off the ground, as Boston suggests. Oregon State says tumblers are popular for keeping rodents out and should be rotated daily or at least several times a week. Spilled scraps under the stand still attract rats, so keep the ground clear.
Sources
- Cornell Waste Management Institute, Preventing Animal Nuisances in Small Scale Composting, fact sheet, 2005; Cornell Composting fact sheets on temperature and on health and safety.
- Oregon State University Extension, EM 9475, Do the rot thing: choosing and using a composting system; Make compost that really cooks: troubleshoot heat, odor and pests; Ask Extension answer on rats in a compost bin, 2026.
- University of California Statewide IPM Program, Pest Notes: Rats.
- Washington Department of Fish and Wildlife, Living with wildlife: Rats.
- City of Boston, GrowBoston: Urban agriculture and rodent management.
- Internet Center for Wildlife Damage Management, Norway rat and house mouse damage prevention and control methods.
- Centers for Disease Control and Prevention, Trap Up: rodent control guidance.
- Fixr cost estimate as compiled on The Pest Control Brief rat exterminator cost guide, 2026.
