Vegetable Garden Fence: How Tall, What Wire and How Deep for Deer, Rabbits and Groundhogs
A vegetable garden fence is sized for the animal you’re keeping out. Cottontail rabbits need 2 ft of poultry wire, tight to the ground. For groundhogs, go 3 to 4 ft and bury the bottom, bent outward. Raccoons climb, so keeping them out takes electric wire. Deer need 8 ft, or a shorter fence around a small space, a double fence or an electric fence.

The 30‑second choice
- Only rabbits? 2 ft poultry wire, buried 2 in or pinned flat (Arizona, Iowa State).
- Rabbits and groundhogs? 3 to 4 ft of heavy wire, with 12 in under the ground and an L bent outward (Penn State).
- Deer as well? 8 ft of woven wire, or 4 to 6 ft if the fenced area is small (Arizona).
- Squirrels or birds? A fence won’t stop them. Cover the bed itself (see our enclosed raised bed guide).

Fence height and wire by animal
| Keeping out | Height above ground | Wire | Bottom of the fence | Source |
|---|---|---|---|---|
| Cottontail rabbits | 2 ft | Poultry wire, stretched tight | Buried at least 2 in, or pinned with U-shaped landscape pins | Arizona, Iowa State |
| Jackrabbits | 3 ft | Not specified | Buried at least 6 in | Arizona |
| Groundhogs (woodchucks) | 3 to 4 ft, top 15 in bent outward at 45° | Heavy poultry wire or 2 in woven mesh | Buried 12 in, the last 6 in bent outward in an L | Penn State |
| Raccoons | Electric wires at 6 and 12 in (Iowa State: 4 to 6 and 12 in) | Electric wire, or a fence with an electric wire on top | Woven wire buried 2 ft, because they dig | Arizona, Iowa State |
| Pocket gophers | About 1 ft above ground, so they can’t walk over | Galvanized hardware cloth, 1/4 or 1/2 in | Buried 18 in (about 90% dependable, per Arizona); Arizona also gives at least 2 ft | Arizona |
| Javelina (Southwest) | 4 ft | Chain link or woven wire, with 2 ft of poultry wire along the base | Not specified | Arizona |
| Deer | 8 ft; 4 to 6 ft around a small area | Woven wire, high-tension wire, UV-stabilized vinyl mesh (Arizona) | Not the issue: deer jump | Arizona; 8 ft also Colorado State |
| Squirrels, woodrats | A fence isn’t enough: they climb | Complete enclosure with poultry wire | Also closed underneath | Arizona |
More than one animal? Build for the hardest one, then add the extras. Arizona Extension’s Jeff Schalau describes his own garden fence: 4 ft of woven wire with a 2 ft band of poultry wire along the bottom, partly buried (BYG #210). By Arizona’s numbers, the poultry wire band covers cottontails and 4 ft covers deer only around a small area.
Which fence material
The University of Arizona’s Fencing Your Garden compares the common choices:
- Woven wire: durable, sold in many heights and hole sizes. Best on level ground, because it doesn’t flex.
- Welded wire: similar to woven wire but usually less durable. Also best on level ground.
- Chain link: lasts a long time, needs little care, and flexes a little more on uneven ground.
- Poultry wire: the bottom band for rabbits. Arizona uses it at the base of a woven wire fence.
- Wood: looks better than wire but needs paint and repairs. A solid wood fence also shades the beds.
- Brick, block or stone: the most permanent and the most expensive. It blocks light and holds heat, and it can trap cold air on frosty nights.
Wire lets air, water and light through, which is what a vegetable bed wants. Colorado State adds that wire mesh works better than wood against deer, although not 100% (CSU).
If you close the whole garden in, leave a way in for pollinators. Arizona says chain link or poultry wire should work fine for that.
Treated wood posts. Chemicals from pressure-treated wood do leach into the soil, and plants take up very small amounts; Oregon State Extension says it hasn’t seen research showing levels that concern human health. Penn State recommends ACQ-treated wood, which has no arsenic or chromium, over the old CCA, restricted for home use since 2004 (Oregon State). Fence posts usually stand outside the beds, along the paths. If you’d rather not use treated wood at all, metal T-posts work for the posts in between.
A fence for one or two 4×8 raised beds
Most small gardens are one or two raised beds, so the plan below sizes a fence around them. The layout and quantities are our own math, not a published plan.
Layout
- Two 4×8 beds: side by side, with a 2 ft path between them and 2 ft of path all around, inside the fence. The fenced area is 14 ft by 12 ft.
- One 4×8 bed: 2 ft of path on every side. The fenced area is 8 ft by 12 ft.
- Why the paths: you need room to kneel, harvest and push a wheelbarrow along the beds. A fence tight against the bed makes the far side hard to reach.
- Gate: 3 ft wide on a short side, so a wheelbarrow fits. Arizona’s advice is that the gate should be as sturdy as the fence and keep out the same animals.
Materials for two beds (14 × 12 ft)
- Fence line: 52 ft around, so 49 ft of wire after the 3 ft gate. Buy a little extra to wrap the gate posts.
- Wire: 49 ft of 4 ft woven wire, plus 49 ft of 2 ft poultry wire for the bottom band if you have rabbits.
- Posts: 4 wooden corner posts, 2 wooden gate posts, and 3 T-posts, one in the middle of each side without the gate. That puts a post every 6 to 7 ft. Wooden corners with T-posts in between is the setup in Arizona’s example fence.
- Fasteners: hog rings to join the poultry wire to the woven wire (Arizona), fence clips for the T-posts, staples for the wooden posts, and landscape pins if you pin the bottom instead of burying it (Iowa State).
- Gate sweep: a strip of poultry wire along the bottom of the gate. Arizona uses one to stop rabbits slipping through the gap.
For one bed (8 × 12 ft), the same math gives 40 ft around and 37 ft of wire.
Groundhog version. Penn State’s design needs wire 12 in below ground and 3 to 4 ft above it. A 4 ft wide roll gives you 3 ft above and 1 ft below. Penn State also bends the top 15 in outward, but doesn’t say whether that bent top is part of the 3 to 4 ft; to be safe, add about 15 in (our math).
How to put it up
A DIY vegetable garden fence goes up in eight steps:
- Mark the corners and the gate. Check the paths first by walking the layout with a wheelbarrow.
- Set the corner and gate posts. They take the pull of the wire, so make them the sturdiest ones.
- Drive the T-posts in a straight line between the corners.
- Dig the trench where the bottom will be buried: 2 in for cottontails, 6 in for jackrabbits, 12 in for groundhogs, 18 in to 2 ft for gophers (Arizona, Penn State).
- Hang the woven wire. Start at a gate post, stretch it tight around the corners and finish at the other gate post.
- Add the poultry wire band at the bottom, tied to the woven wire with hog rings. Bury it, or bend it outward and pin it flat.
- Hang the gate and add the poultry wire sweep along the bottom.
- Backfill the trench and walk the line, looking for any gap under the fence that an animal could use.

The L-shaped bottom: why groundhogs and rabbits don’t dig under
The idea (our explanation): an animal digging at the base of the fence hits buried wire, and the outward bend puts wire in its way a little further out too. Penn State’s groundhog fence has 12 in of wire under the ground, with the last 6 in bent outward like an L. It also bends the top 15 in outward at 45°, which helps stop groundhogs climbing over (Penn State). That page dates from 2006, but it’s still the clearest Extension design we found.
For cottontails, Iowa State’s lighter fix works: pin the wire tight to the ground with U-shaped landscape pins, or bury it 1 to 2 in (Iowa State).
Deer: 8 ft, or a smarter shorter fence
The sources give different heights:
- 8 ft for a vertical wire fence (Colorado State, Arizona). Arizona says deer can and will jump fences under 8 ft.
- 6 ft was enough for a garden in Montana State University research (MSU).
- 4 to 6 ft around a small area, because deer don’t like jumping into small enclosed spaces (Arizona). Colorado State gives at least 4 ft for fences around single plants or small groups.
Nobody defines “small” in feet. A 14 × 12 ft fence around two beds is small, but if deer visit every night, plan to go taller.
Three ways to stop deer without an 8 ft fence
- Double fence: two low fences 38 in apart. Deer feel they can’t clear both without injury (Arizona).
- Slanted fence: leans away from the garden at 30 to 45° from the ground, at least 6 ft high (Colorado State).
- Electric fence: at least two wires, at 18 and 36 in; some people add a third at 24 in. Deer would rather crawl under than jump, which brings them into the low wire. A little peanut butter inside some aluminum foil on the wire gets them to touch it (Arizona). Montana State calls for a well-grounded, low-impedance charger of at least 2,000 volts.
Electric fence notes: Arizona says to put up warning signs for people. Keep grass and weeds off the wires, or the fence shorts out (Penn State). Deer rules vary by state; Arizona reminds readers that advice from other states may not be legal there. Check local rules before you buy a charger.
What gardeners report. On Reddit, a beginner fencing a 10 × 10 ft garden at 5 ft asked if it would stop deer. Experienced gardeners split: some said deer avoid tight landing spots, others that 5 ft won’t hold if a deer decides to try. One suggested tall posts in the corners with wire and marker tape to raise the height (r/vegetablegardening). These are gardeners’ reports rather than tests, and they match the Extension advice: with heavy deer traffic, a short fence is a gamble.
When a fence isn’t the answer
- Squirrels and woodrats climb and dig, so Arizona says they may need complete enclosure: sides and a top. That’s easier on the bed than around the garden. See our enclosed raised garden beds guide.
- Birds fly over. Use netting on a frame over the bed.
- Gophers under a raised bed: wire across the bottom of the bed, before you fill it, is “very effective” as long as they can’t climb the sides (Arizona). Our DIY raised bed plan shows where it goes.
- One bed and only rabbits: a hoop tunnel or wire cage on the bed can do the job of a fence. One Reddit gardener reported a hoop tunnel with insect netting kept rabbits out of a 4×8 (r/vegetablegardening).
Common mistakes
- Gaps at the bottom. Cottontails need the wire tight to the ground (Arizona, Iowa State).
- A short fence around a big open space with deer. Deer jump fences under 8 ft (Arizona); short fences only work around small areas.
- Fencing raccoons with wire alone. They climb almost any fence. Add an electric wire at the top (Arizona).
- Weeds on electric wires. Vegetation shorts the fence (Penn State).
- A gate weaker than the fence. The gate has to keep out the same animals (Arizona).
- Forgetting pollinators when you close everything in (Arizona).
- A solid fence on the sunny side. Wood and masonry block light the beds need (Arizona).
FAQ
How tall should a vegetable garden fence be?
2 ft for cottontail rabbits, 3 ft for jackrabbits, 3 to 4 ft for groundhogs, and 8 ft for deer (or 4 to 6 ft around a small area) (Arizona, Penn State, Colorado State).
What fence keeps rabbits out?
A rabbit proof garden fence is poultry wire 2 ft tall, stretched tight and buried at least 2 in or pinned to the ground (Arizona, Iowa State). Add a poultry wire sweep under the gate.
How deep should a garden fence be buried?
2 in for cottontails, 6 in for jackrabbits, 12 in with an outward L for groundhogs, 18 in to 2 ft for gophers (Arizona, Penn State).
Is a 4 ft fence enough for deer?
Around a small area it can be, because deer avoid jumping into small enclosed spaces (Arizona, Colorado State). With heavy deer traffic, go to 8 ft or add a second fence or electric wires.
Can I use pressure-treated posts in a vegetable garden?
The chemicals do leach into the soil and plants take up very small amounts, but Oregon State Extension says it hasn’t seen research showing levels that concern human health. Penn State recommends ACQ-treated wood over CCA. Metal T-posts are an alternative for the in-between posts.
Do I need a fence or a covered bed?
A fence for animals that walk in (rabbits, groundhogs, deer). A covered bed for animals that climb or fly (squirrels, birds), or for one bed with rabbits.
When to plant inside your new fence depends on your frost dates. Your USDA hardiness zone gives a rough idea; your state’s Cooperative Extension planting calendar gives the dates.
Sources
- University of Arizona Cooperative Extension, Yavapai County. Managing Critters in Vegetable Gardens: Summary Information. May 5, 2025. https://www.extension.arizona.edu/sites/default/files/2025-05/Managing-Critters-in-Vegetable-Gardens.pdf
- Schalau, J. Fencing Your Garden (Backyard Gardener #210). University of Arizona Cooperative Extension, Yavapai County, June 29, 2024. https://extension.arizona.edu/sites/extension.arizona.edu/files/attachment/FencingGarden.pdf
- Iowa State University Extension and Outreach. How do I prevent rabbits from damaging plants in the vegetable garden? Updated January 7, 2025. https://yardandgarden.extension.iastate.edu/faq/how-do-i-prevent-rabbits-damaging-plants-vegetable-garden
- Iowa State University Extension and Outreach. How can I keep raccoons out of my sweet corn? Updated March 4, 2022. https://yardandgarden.extension.iastate.edu/faq/how-can-i-keep-raccoons-out-my-sweet-corn
- Thurston, S. N., Brittingham, M. C., Williams-Whitmer, L. M. Woodchucks. Penn State Extension, updated December 8, 2006. https://extension.psu.edu/woodchucks
- Colorado State University Extension. Deer Control (PlantTalk 2301). https://planttalk.colostate.edu/topics/wildlife-issues/2301-deer-control/
- Knight, J. E. Organic Deer Control. Montana State University Extension. https://animalrangeextension.montana.edu/wildlife/prevention_and_control/organic-deer-control.html
- Leavengood, S. Raised bed lumber, pressure treated safe? Oregon State University Extension, August 2013, reviewed 2024. https://extension.oregonstate.edu/gardening/techniques/raised-bed-lumber-pressure-treated-safe
- USDA Agricultural Research Service. Plant Hardiness Zone Map. https://planthardiness.ars.usda.gov/
- Gardeners’ reports: r/vegetablegardening, “Fencing questions, concerns about deer”, May 2026, https://www.reddit.com/r/vegetablegardening/comments/1tmb2j8/fencing_questions_concerns_about_deer/ ; r/vegetablegardening, “Fencing to protect single 4x8 raised bed from deer and rabbits?”, April 2026, https://www.reddit.com/r/vegetablegardening/comments/1smo2w7/fencing_to_protect_single_4x8_raised_bed_from/