How to Keep Rats out of Your Compost

, written by gb flag

Rat in the garden

With cold days approaching, the need for warmth and plenty of food, where would you choose to shelter? Well, if you were a rat, it could well be in a compost heap – somewhere with plenty of fresh kitchen scraps to feast on and a nice bit of heat from the decomposing material.

This is certainly what one rat thought of my heap a few years ago. I raised the lid on a nearly full bin and came eyeball to eyeball with a feasting rodent. Was there ever a larger rat with longer teeth? Probably, but shock magnified the scene and I only had a glimpse as my shriek rent the air and, with lightning speed, it whipped down a hole to the nether regions of the bin.

It was most definitely time to get involved in some rat-proofing. If you find the idea of coming face to face with a rodent as repellent as I did, I’m glad to say that a few simple measures ensured that I haven’t ever had the same experience again.

Steel mesh to prevent rats entering compost bins

Five Ways to Rat-Proof Your Compost Bin

  1. Use a solid-sided bin. If you have a wooden, open-slatted bin then it’s best to use it only for garden waste. Vegetable peelings and other kitchen waste (rats are, apparently, particularly partial to potato peelings) should go in a closed bin, with solid sides and a lid. Some of the commercial plastic varieties come with a rat-proof base, but if yours doesn’t then place it on wire mesh. Rats can squeeze through gaps of 15 mm (just over half an inch), so the holes in the mesh need to be smaller than this. It also needs to be heavy-duty. Chicken wire isn’t thick enough as rodent teeth are sharp! I use a galvanized, 13mm x 13 mm (0.5 x 0.5 inches) light welded mesh.
  2. Rat-chewed compost bin lid
  3. Ensure the bin is set squarely so that there is no gap between the sides and the lid. This makes it harder for a rat to gain an easy purchase. Rats love nothing more than finding an edge to nibble on. I made the mistake of not setting the bin squarely, and teeth marks made it very clear what had made the hole I found.
  4. Rats are secretive souls. They prefer to keep to the edges of things and haunt passages like those made between a fence and a closely positioned shed. Situate your compost heap as much in the open as possible, away from likely rat-runs along over-grown fence-lines and the sides of buildings, so that they are discouraged by a lack of cover.
  5. Rats don’t like disturbance. Putting the bin somewhere you pass by often and giving it a good rat-a-tat on the side with a stick every time will discourage them from taking up residence.
  6. Don’t add cooked food, especially meat and fish, or anything strong-smelling like cheese and fats to the bin. I also found that egg shells were a particular favourite, to the extent that they started calling at it for a take-out.
Rodent nest in garden

Take Stock of Your Garden

Once your bin is sorted, have an objective look round your garden from a rat’s point of view. The current enthusiasm for wildlife gardening isn’t selective when it comes to the wildlife it attracts, so rodents can be the penalty we pay for long grass and wildflower meadows. It would be a shame to get rid of these if you like them, but it’s better not to have the compost heap in the middle.

Bird feeders also need looking at. Birds are nothing if not messy eaters and lots of grain tends to fall to the ground beneath which is a major attraction for rats. Consider setting a large paving slab below the feeder so that it’s easier to brush up fallen seed.

Once you’ve carried out a few simple measures, you should find that rats move on to find easier lodgings. If you do find the rats in your area are particularly persistent, then it could be the moment to consider a well-built compost tumbler.

By Helen Gazeley

< All Guides

Garden Planning Apps

If you need help designing your vegetable garden, try our Vegetable Garden Planner.
Garden Planning Apps and Software

Vegetable Garden Pest Warnings

Want to Receive Alerts When Pests are Heading Your Way?

If you've seen any pests or beneficial insects in your garden in the past few days please report them to The Big Bug Hunt and help create a warning system to alert you when bugs are heading your way.

Show Comments


"Awww, the poor, little rat. ;) Probably not what you wanted to hear, but then I have kept rodents as pets. I've got neat looking little lizards in my compost bin. And I apparently had a rat living under my garden plot, because one time when I went and turned the soil over, I found a complete, nicely cleaned rat skeleton. Figured the rat made for nice touch of compost in that spot. :)"
Sylvia on Saturday 2 November 2013
"I agree with Sylvia. I see nothing wrong with a rat helping to break down the compost a little. Their droppings aren't any more offensive than rabbit or bird (actually less than bird in my opinion). Of course, I guess if you're scared of the little things it does make a difference. Here's a big hint, though, if you are. Cats. :-)"
Amanda on Sunday 3 November 2013
"Yes, rats are amazing, wonderful little creations! But I'm sure the folks in Europe did not agree, during the bubonic plague(s) of the 14th century, when half the human population there was wiped out. Be aware, Yersinia pestis, or Black Death, exists in the wildlife in the American west and pops up now and again. And rats carry it. There's a reason why rats have a bad rap! Make sure your compost pile does not harbor rats, for your kids' and your neighborhood. Don't believe me? Google on it. Bubonic plague 2013."
Peg on Monday 4 November 2013
"Wild rats are certainly part of nature but they're not the same as the charming pet rats that we keep in the house and there are plenty of places for them to live outside without taking up residence in a structure that brings us humans within inches of them. If you ignore them, the chances are they will become bolder. I've had one venture into the kitchen from a neglected compost heap placed near the back door. A rat bite is a serious injury that needs swift medical attention. Rats also carry Weil's disease which survives in moisture. It's always wise to take care, but if you have rats in your compost and wish to keep them there, you should certainly always ensure all cuts are covered and wear gloves while handling the compost."
Helen Gazeley on Monday 4 November 2013
"Oh my! I had no idea the plague was in this country, though I suppose it makes sense. I don't need that to scare me, though. It is wise to make sure rats keep their distance for many reasons, though I would only be sure the rat feared me, rather than kicking it out completely. A good yell or thrown something makes sure any wild critters stay far from me, without robbing them of a home I've taken by 'owning' land they had first, anyway. And yes, cautions like gloves are always good, for so many reasons. Thankfully, I have far too many cats, so I doubt I'll ever have to worry about it. Anyone in SW MO want one? LOL!"
Amanda on Tuesday 5 November 2013
"My suggestion is to put your kitchen scraps directly onto your kitchen garden Do not have a compost. Spread it around and cover it with mulch Leaves straw, cardboard or whatever your mulch is This is easier than all this composting business and you still benefit from the organic matter"
Inger Knudsen on Friday 15 November 2013
"I love all animal things and have been quite accepting of my rat visitors...until one killed a baby bunny in front of my guests and I yesterday afternoon. So, rat proofing it is. Humane traps are set. Fortifying the compost bin. There's no room in my garden for murderous beasties! Thanks for the tips :) "
Kat on Sunday 29 June 2014
"The plague was not caused by the rats themselves but in fact the fleas that lived on them. these fleas were also commonly found on pet dogs and cats! So the poor ratties were not the only one responsible for the spread of the plague, but unfortunately many reports fail to mention this!"
Andrea on Thursday 19 February 2015
"So glad to see comments that are in sympathy with rats. I have a bit of a problem with them as they are taking my chicken food. I remove all food at night, but I see the rat taking the food during the day. I have to admit, he really is a magnificent specimen."
Vivien on Tuesday 24 March 2015
"We never had rats in the compost for the first 5 years here, though they are around and about (they even ate much of our kale one fall) but when we put some leftover oatmealI in the bin, the problem started soon thereafter. They ate through the ratproof compost. God they are tenacious. thanks for the mesh tip. that's next. I hate the idea of killing rats so I'm try to lure them away and discourage them."
Glen on Sunday 29 March 2015
"why do you hate the thought of killing rats, if you had a member of your family die from veils disease caught from rats, you might think differently, my dad caught the disease, and within 10 days he had died. So think again when you are down your allotment and you don't have gloves on, also if you have a water source down at the allotment i.e. is it a trough, it must be covered otherwise rats could get in it, so anyone collecting water from this source could be at risk. All what I have said is fact, the chances of contacting the disease are pretty slim, so why take the chance. My dad milked cows for a living "
Steve perkins on Tuesday 31 March 2015
"I agree with Steve Perkins. I caught Weils Disease (Leptospirosis), but luckily I survived; 10 days in hospital after organ failure later. Rats don't have a bladder, so dribble urine wherever they go. This is how the disease is spread and can be caught if ingested or through an open cut; drinking from a ring-pull can that a rat has run over is a fairly common way of catching, as it is for golfers who consider it lucky to lick their balls (no pun intended). Cute, but deadly. Don't say we didn't warn you!"
John Qualtrough on Thursday 30 April 2015
"It's interesting that no one's mentioned the fact that rats are invasive pests and are quite happy to feast on birds' eggs. Living near a gully that's being restored and now has tui visiting, I'd hate to see my garden as a breeding ground for rats. I appreciate that folk don't like killing animals but it depends on what your priorities are. Mine are ensuring a safe place for native birds to flourish - after all, they were here long before any of us, rats included. So rats traps it is - I'd far rather hear a tui chortling away than a rat scratching around! "
Monica Peters on Wednesday 24 June 2015
"great article thanks!"
sarah on Wednesday 29 July 2015
"I am confused. The rodent pictured appears to me to just be a common mouse. Perhaps I need some education in rodents. I thought moles, voles, shrew all looked pretty similiar and rats were much bigger and longer tail maybe? Guess I don't have a lot of info on them. May need better research."
Dan on Monday 31 August 2015
"Good tip on using wire to keep out rodents. Just reconfigured my Rubbermaid compost bin the rats had chewed through. Attached some hardware cloth with Grabber "wide spread" screws "
Jim Draper on Monday 4 April 2016
"I have solved the problem of rats after the chicken feed. Several weeks ago, I bought a "Grandpa's feeder". They are from New Zealand and only open to expose the food when chickens stand on the treadle. It takes three weeks to train the chickens to use it but they are really used to using it now and it works a treat. The rats cannot get in there and I no longer see them about. There are several cheaper copies of these feeders on the market but they fall short of this one. They aren't cheap, but worth every penny!"
Vivien on Monday 4 April 2016
"If you use 1/4 inch metal mesh, you will keep out mice too. For a metal compost bin that keeps out all vermin, check out Speedibin, made in Canada. "
Joyce on Saturday 28 May 2016
"I wanted to read this article, but the metric measurements were too obnoxious. If you're a Canadian writing primarily to other insignificant Canadians, fine, but don't impose your global imperialist language on the rest of us."
Eric on Tuesday 16 August 2016
"Hi Eric. We give measurements in both metric and imperial as these articles are read by both US, Canadian, British and other English-speakers. Articles written by British writers show metric first, while articles written by Barbara, our US writer, are given in imperial. This represents the most commonly used measurement types in their respective regions."
Ben Vanheems on Tuesday 16 August 2016
"Nice Info."
Sonya Carmody on Friday 9 September 2016
"Rodents can be kept away by keeping traps and poison balls. One can also consult a pest control exterminator and seek their help to keep rodents away in a safer manner."
Sonya Carmody on Friday 9 September 2016
"Contacting the pest control companies is a good decision as they have the professionals to deal with the pest problems. "
John Frady on Thursday 15 September 2016
"A grey squirrel ate through a brand new water pipe ( they like to sharpen teeth). My Oak trees have bark chewed off them. They take bird eggs too. We also have rats in a compost heap in bottom of garden but it's a long way from our house. Recycling scraps waste if you have a small garden you will encourage rats. They will chew through electrical cables and can cause house fires. In our loft we found dead mice, I had 3 dead rats after trapping. I could hear gnawing in our loft. Yes out I garden fine but they will breed, carry disease and do unlimited damage to your property. A pet rat is kept in a cage and controlled but they do need controlling outside too particularly if you are feeding them with your lovely compost. The original article does give good practical sensible realistic seems sad we waste so much food."
P Thomson on Sunday 25 September 2016
"Eric wrote: "I wanted to read this article, but the metric measurements were too obnoxious. If you're a Canadian writing primarily to other insignificant Canadians, fine, but don't impose your global imperialist language on the rest of us." Tuesday 16 August 2016 To which Ben answered in civil tones. I, meanwhile, a USAer like Eric, am fuming. "Insignificant Canadians"? "Global imperialist language"? The contradiction inherent in these two phrases would be laughable if it weren't disgraceful. My apologies on his behalf to the rest of the world. Ben, thanks "
Joanna on Friday 24 February 2017
"Is it okay to use compost from a bin that has had mice or rats inside ? Does their urine or faeces pose any problems ?"
Paul Hill on Thursday 15 June 2017
"Hi Paul. I wouldn't use it around edible crops, but I'd be happy spreading it around ornamental plants or trees, so it needn't go to waste."
Ben Vanheems on Thursday 15 June 2017
"There's nothing wrong with a rat that a Border Terrier can't cure."
Mike on Thursday 20 July 2017
"This article is a wonderful summary our long battle to outwit the rats attracted to our plastic composting bin. At first we were successful in attracting them into traps baited with protein and peanut butter but they seemed to get wise to the loss of their comrades. Our Jack Russell cross would bark continuously at any active holes he could see or smell. Rat poison was the next line of attack but it vanished and the rats did not. Some accredit the Romans for introducing the hypocaust concept of central heating the UK. We found we had the rat equivalent. The plastic compost bin stood on a floor of breeze blocks set on earth. Our intelligent rats had undermined this to make a dry home with the equivalent of a warm over blanket provided by the decomposition of the compost. Our counter intelligence moves have worked! We have now set the plastic composter in concrete and over thick narrow guage wire mesh that is rolled up over the sides of the bin (we could see there had been some nibbled entry points) Most of the compost that had been removed was replaced in the composter as starter material (plenty of fine red worms in it) and all is rat-proof. Some evidence of interest in egg shells in the small amount of residual compost that will soon be distributed as fertiliser. During their leaving period the remaining rats did not like us bricking or wiring over their escape routes and they seem to have taken the hint they are no longer welcome!"
Vic Sullivan on Sunday 23 June 2019
"Hi Vic. It sounds like you had to launch a sustained campaign against those rats, but so pleased you claimed victory in the end!"
Ben Vanheems on Monday 24 June 2019
"Yes, I do hate rats. Going to try the wire mesh and put stones around the outer age and plant some mint in the spring. Hopefully that will do the trick and it will look nice????? Read all the comments. Interesting stuff. Thank you."
Penny on Saturday 27 July 2019
"Hi Penny. Good luck with your quest to keep the rats out. Sounds like you may be onto a good thing with your suggested setup."
Ben Vanheems on Sunday 28 July 2019
"We're just about to move home and this week (for the umpteenth time) discovered that our long established wormery has another furry lodger. What I have learnt in this latest round of research is that they (the rats) like a bit of eggshell, potato peelings and the worms themselves. We also had a "can o worms" sealed wormery which never had this problem, albeit you need a few of them to cope with a family of four. Peelings and coffee grains alone fill a bucket each week. Very helpful Ben thank you. I was vaguely expecting there to be an "ahhh lovely cute creatures" vs "kill them all" debate/bickering, but no. It seems that 25mm vs the 1" is pivotal to world peace and trolling in equal measures. As I always say, everyone needs a hobby eh? "
Tim Hoy on Tuesday 29 October 2019
"Quite right Tim! I hope your move goes smoothly. "
Ben Vanheems on Tuesday 29 October 2019
"A lot of fear-mongering going on here. Of course it makes sense to wear gloves when handling any compost - even shop bought - but once the compost is spread, any chance of Weil's disease or other contamination or disease is pretty much no different to handling soil and not washing your hands. "
Carl Duffin on Tuesday 21 January 2020
"That's a fair point there Carl. Common sense should prevail - and washing hands and taking simply precautions is usually enough to sidestep any risks."
Ben Vanheems on Monday 27 January 2020
"Jack Russell Terriers will make short business of any rats thinking about hanging out in your yard - anywhere. The message will get around. Quick and superior environmentally too. Rent-a-jack! "
Celia Deluca on Sunday 22 November 2020
"I like it. Natural and effective!"
Ben Vanheems on Friday 27 November 2020
"What is missing from this discussion is wild rats' reproduction rate which is a key reason why they are a very serious public health hazard, and why it is very irresponsible to encourage or even tolerate them in any way. Rentokill say: "A female rat typically births six litters a year consisting of 12 rat pups, although 5-10 pups is more common. Rats reach sexual maturity after 4-5 weeks, meaning that a population can swell from two rats to around 1,250 in one year, with the potential to grow exponentially.""
Geoff on Friday 21 May 2021
"Wow Geoff - I never realised they were that prolific!"
Ben Vanheems on Sunday 23 May 2021
"Poison bait should only be put in traps where once the rat is in it stays in. Too many stories here where dogs , cats and wildlife such as owls get poisoned themselves after attacking poisoned rats. There are some people who put rat poison bait all over the place in the open, if in doubt get the professionals in."
Steve clark on Saturday 5 February 2022
"Eric is also confused about imperialist measurements. In fact it is the other way around, Eric is using imperial measurements while the rest of the world (excluding USA) has gone metric!"
Ian Galloway on Tuesday 22 March 2022

Add a Comment

Add your own thoughts on the subject of this article:
(If you have difficulty using this form, please use our Contact Form to send us your comment, along with the title of this article.)

(We won't display this on the website or use it for marketing)


(Please enter the code above to help prevent spam on this article)

By clicking 'Add Comment' you agree to our Terms and Conditions