How to Build a DIY Garden Fence That Stops Rabbits and Deer

Completed DIY garden fence with wire mesh, wooden posts, and vegetable garden inside.

Table of Contents

Nobody builds a garden fence for fun. Something has been eating your lettuce, your dog keeps flattening the tomato bed, or deer have decided your yard is their salad bar.

Before you buy a single post, work out how the culprit gets in. Animals dig under, climb over, jump across, or chew through, and each habit needs a different fix.

A DIY garden fence built for the wrong habit looks fine on day one and fails within weeks, because the fence that stops a rabbit is not the fence that stops a deer. Match the fence to the animal first, then build it start to finish.

What You Need Before You Start

Tools You’ll Want on HandMaterials You’ll Need
Post hole digger or augerWood or metal posts
LevelConcrete mix
Staple gun or brad nailerChicken wire, welded mesh, netting, or wood panels
Miter sawTop and bottom rails
Tin snipsFence fasteners and hardware
Hammer and measuring tapeGate materials (if adding a gate)

Before you touch a shovel, call 811 a few days ahead so utility companies can mark buried lines, and wait for the marks before you dig.

Fence posts go well into the ground, and hitting a gas or electric line is not a mistake you want to make.

It’s also smart to check your property line and any HOA rules before you build. A few feet in the wrong direction can turn a simple weekend project into an awkward conversation with a neighbor. Local codes cap fence height too, and cities such as Philadelphia ask for a permit once a fence passes 6 feet.

How to Build a DIY Garden Fence Step by Step

Step-by-step photo guide showing five stages of building a wooden and wire mesh garden fence.

This guide follows the permanent fence I built around my 16-by-24-foot vegetable garden. It runs about 80 linear feet, with a framed 3-foot gate and a buried L-footer.

Step 1: Plan and Measure Your Fence Line

Use stakes and string to mark the fence perimeter before digging. This helps you plan the layout, place corners, and decide the gate location early.

For curved beds, tight corners, or sloped yards, adjust the post spacing to match the landscape. Use a level between posts to keep the fence aligned instead of forcing straight panels into uneven spaces.

Step 2: Choose Your Fence Material

A fence that looks charming on day one but gets chewed through by week six isn’t much of a fence.

MaterialTypical DIY material cost per linear ft (retail estimates, November 2026)Best ForWatch Out For
Chicken wire$0.40 to $1.20Small pests, budget buildsWeaker wire can bend or tear over time
Wood panelsAbout $11Classic look, longer lifespanDoesn’t fully seal out small animals on its own
Vinyl$12 to $26Low maintenance, privacyHigher upfront cost
Welded wire mesh$1 to $2 for a 4-foot-tall roll, $2 to $4 for 8-foot-tall woven wireDetermined chewers, climbing plantsSlightly harder to cut and shape
Plastic nettingAbout $0.65 for 7.5-foot-tall plastic meshDeer, fast or temporary fixesRabbits and rodents can chew straight through it

Prices vary by region and store, so check current prices at your local supplier before you buy. Those figures cover materials only, and hiring a crew adds labor. For 8-foot woven wire, Missouri Extension lists $5 to $7 per foot installed.

Four fence materials side by side showing chicken wire, welded wire, woven wire and black plastic netting

Look at the opening shape and the joints, not just the price.

On wire, a lower gauge number means thicker, stronger wire, so a 14-gauge roll holds up better than a 20-gauge one.

If pests are a problem, use wire mesh from the start to avoid replacing the fence later.

On my own fence, I went with a 4-foot-tall, 100-foot roll of 16-gauge galvanized welded wire with 1-by-2-inch openings. It’s rigid enough that it doesn’t flop or sag between posts, and the narrow mesh keeps even baby rabbits from squeezing through. I buried about 10 inches of the bottom edge for the L-footer, so the finished fence sits a little over 3 feet high. That’s plenty for rabbits and small backyard pests without feeling like a fortress.

Step 3: Set Your Posts

Dig each hole about one-third as deep as the post is long, and never less than 2 feet for a line post. Buy posts long enough to cover the fence height, the hole depth, and 6 extra inches. Space posts 6 to 8 feet apart on straight runs, then set each post with a level.

Concrete gives the firmest hold, so use it on corner and gate posts, which carry the most strain. Line posts can go in tamped gravel or the soil you dug out, since concrete can trap moisture against the wood. Where the ground freezes, make sure the hole reaches below the frost line so winter heave can’t lift the post. Your local building department can tell you that depth.

For my fence, I used 11 pressure-treated 4×4 posts, each 6 feet long, spaced about 8 feet apart with an extra post framing the 3-foot gate opening. I dug each hole 2 feet deep, dropped a couple of inches of gravel in the bottom for drainage, and locked each post in with a 50-pound bag of fast-setting concrete. Digging by hand and setting all 11 posts took most of a Saturday, roughly 5 to 6 hours. Fast-setting concrete firms up in under an hour, but I gave it a full 24 hours to cure before pulling wire against the posts so nothing shifted out of plumb.

For sloped yards, keep posts at a consistent height and trim the tops afterward so the fence follows the natural grade. This looks cleaner than forcing a perfectly level line.

Step 4: Attach the Fencing

Once the posts are set, attach top and bottom rails with exterior screws, then secure the fencing material using staples or nails. Work from one corner to the other, pulling the wire snug by hand before each section gets its last staples, and trim any extra as needed. Hot-dip galvanized staples about 2 inches long hold up best on wood posts.

I didn’t want to buy a dedicated fence stretcher for a single backyard build, so I made one out of two scrap 2x4s clamped tightly over the end of the welded wire. I hooked a ratcheting come-along to the boards and anchored the other end to the next braced corner post. Cranked tight, it took all the waves out of the mesh so I could staple it flat down the line, then unclamp and move on to the next section.

Side view of a wire garden fence with the bottom bent outward underground to stop animals digging in

The wire bends away from the garden, so a digging animal meets mesh under its paws.

For better pest control, bend the bottom of the wire outward instead of burying it along the inside edge. For rabbits, turn the bottom 12 inches away from the garden and bury it a few inches deep. That’s the apron University of Georgia Extension recommends. A digging animal starts at the base of the fence, so the apron puts wire under its paws before it can tunnel in. Wire bent toward the garden lets the animal dig down along the fence, pass the bottom edge and come up inside.

For groundhogs, bury the wire about 12 inches deep and bend the lowest 6 inches outward in an L. Some agencies advise going down as far as 2 feet, so check what your local wildlife office suggests. For dogs and cats that dig, start with a 5-foot roll and bend the bottom 24 inches outward.

Step 5: Build and Hang a Gate

Leave about a 3/4-inch gap on each side of the gate opening so it can swing smoothly. Build a simple rectangular frame, then add a diagonal brace to keep it from sagging over time.

Wooden garden gate with wire mesh, one diagonal brace, two hinges and a latch on the opposite post

The brace runs up from the bottom hinge to the latch side to stop the gate sagging.

Attach the same fencing material used on the rest of the fence. Secure the gate with two strong hinges and a latch, making sure it opens and closes easily.

Self-closing hinges are a helpful addition because they prevent the gate from being accidentally left open and keep pests out.

Step 6: Test the Fence Before You Call It Done

Push on the mesh at the base every few feet and look for any gap bigger than the mesh openings. Shove each post, too, and none of them should move. Then open the gate and let go. If you used self-closing hinges, it should swing shut and latch on its own.

DIY Garden Fence Builds With Shopping Lists and Costs

Infographic comparing materials, dimensions, and costs for a budget garden fence versus a permanent garden fence.

Both builds use retail prices checked in November 2026 and leave out staples and tools, so treat each total as a starting point.

Budget Build for a Small Bed

This build fences an 8-by-12-foot bed, a 40-foot run, with 1-inch poultry netting that stands 3 feet tall plus an outward apron. Space the stakes about 6 feet apart and staple the netting to each one.

ItemQuantityPrice eachCost
1-inch poultry netting, 48 inches by 50 feet1 roll$34.75 to $59.99$34.75 to $59.99
2x4x8 pressure-treated boards, cut into 4-foot stakes4$3.98$15.92
Total$50.67 to $75.91

That total leaves out staples and tools. The easiest version skips digging altogether. Swap the stakes for seven 6-foot studded T-posts, which add about $26, and drive each one until its anchor plate sits below the surface.

Permanent Build for a 10 by 20 Foot Garden

This build fences a 10-by-20-foot garden, a 60-foot run, with 4×4 posts, 2×4 rails, and 5-foot welded wire. The wire stands 4 feet tall, and the last foot turns outward as a buried apron. Each 8-foot post is cut to 6 feet 6 inches, which covers the fence height, a 2-foot hole, and 6 extra inches. The gate is 3 feet wide.

ItemQuantityPrice eachCost
4x4x8 pressure-treated posts11$10.68$117.48
2x4x8 pressure-treated boards for rails and the gate frame20$3.98$79.60
Welded wire, 14 gauge, 2 by 4 inch mesh, 5 feet by 50 feet2 rolls$59.88 to $64.55$119.76 to $129.10
50-pound bags of fast-setting concrete9$12.99$116.91
Gate hardware kit with hinges, latch, and pull1$19.83$19.83
Total$453.58 to $462.92

The concrete fills eight-inch-wide holes around the four corner posts and the two gate posts. The other five posts go in tamped soil. That works out to about $7.60 per foot with posts, concrete and the gate included. The wire stops dogs and other large animals. For rabbits, line the bottom 2 feet with 1-inch poultry netting.

What My Own Fences Cost

I’ve built both versions over the years. The removable one came first, when I wasn’t ready to commit to a layout, and the welded-wire fence went in once the garden beds were set.

My removable stake-and-mesh fence covered a 10-by-16-foot seasonal bed, about 50 linear feet, and pulled up in 20 minutes at the end of fall. Landscape staples pinned the bottom edge flat against the turf.

ItemQuantityCost
3-foot by 50-foot roll of 20-gauge galvanized chicken wire1 rollAbout $35
4-foot light-duty metal U-posts10About $45
UV-resistant zip ties1 packAbout $8
6-inch landscape staples1 packAbout $12
TotalRight around $100

My permanent fence is the one these steps follow.

ItemQuantityCost
4-foot by 100-foot roll of 16-gauge galvanized welded wire, 1-by-2-inch mesh1 rollAbout $120
6-foot pressure-treated 4×4 posts11About $121
8-foot pressure-treated 2x4s for the rails and gate frame22About $121
50-pound bags of fast-setting concrete11About $72
Exterior deck screws, galvanized fence staples, self-closing gate hinges and a latchAbout $65
TotalRight around $500

Building vs Buying Panels

Wood panels cost more per foot than wire before you add posts, and 60 feet takes 8 panels, about $720 for the panels alone. Panels give you privacy that wire can’t, but for keeping pests out of a vegetable garden, wire is the cheaper way to build.

How Tall Should a Garden Fence Be?

Tall woven wire deer fence about eight feet high on wooden and steel posts beside a vegetable field

A deer fence needs to reach 8 feet, about twice the height of the rabbit fence.

Post length and wire roll size both follow the fence height, so settle this before you buy anything.

What You’re Keeping OutFence HeightNotes
Rabbits2 feetUse 1-inch hexagonal openings. In snowy areas, build taller, since snow that nears the fence height makes it useless.
Dogs3 feetWire is enough for most dogs. Go taller for dogs that climb or jump.
Deer8 feet or tallerAn adult deer can easily jump 7 feet, so a shorter fence only reduces the damage. Hang flagging where deer cross so they notice the fence.
PrivacyCheck your local limit firstMany cities cap backyard fences at 6 feet, and a taller fence may need a permit.

An 8-foot deer fence is taller than many local limits, so ask your building department before you order materials.

If you’re only dealing with rabbits, you don’t need to overbuild. But if deer are a regular visitor, don’t cut corners on height.

Height does most of the work, but fencing to exclude deer for good usually comes down to a mix of fence height, sightlines, and what you plant near the fence line.

Fence Tips for Keeping Raccoons and Squirrels Out

Raccoons climb almost any fence, so extra height alone won’t stop them. Use a fence 5 to 6 feet tall, bury a 24-inch apron on the outside, and leave the top 18 inches of the wire unattached so it bends over when an animal climbs. For extra security, run one electric wire along the top, powered by a low-output charger.

Wire garden fence with the unattached top section curling outward and one electric wire above it

The top 18 inches stays loose, so it folds back under a climbing raccoon.

Squirrels are harder. They climb well, so a fence only slows them down, though the same loose top helps.

Common Garden Fence Mistakes to Skip

  • Digging before the utility lines are marked.
  • Building a deer fence under 8 feet tall.
  • Bending the base wire inward instead of outward.
  • Choosing mesh with openings too large for the pest.
  • Ignoring property lines, HOA rules, and local height limits.

Fence Style Ideas to Try

Five DIY garden fence styles: pallet wood, split rail, picket fence, corrugated metal, and living hedge.

Once the functional fence is in place, there’s plenty of room to make it look intentional rather than purely practical:

  • Pallet wood for a rustic, budget-friendly border
  • Split rail with wire backing for a classic countryside look
  • Painted picket sections around individual beds instead of the whole yard
  • Corrugated metal panels for a modern, low-maintenance option
  • A living hedge with low-maintenance border plants for a natural boundary that fills in over time.

Match the style to your garden’s overall look rather than picking whatever’s trending. A rustic pallet fence next to a very modern patio tends to look like an afterthought, not a choice.

DIY Garden Fence Maintenance and Lifespan

Walk the fence once a season and fix any spot where an animal could crawl under or squeeze through. Restaple loose wire and check that the apron is still buried.

My own permanent fence held up well through its first year, with two small exceptions. After the first spring thaw, the wooden gate sagged about half an inch, just enough for the latch to miss the catch. A steel turnbuckle anti-sag kit across the frame pulled it back into square in about 15 minutes. Rain also washed out a shallow dip right under the gate, where the buried L-footer couldn’t run, and a rabbit quickly found the 2-inch gap. Sinking a pressure-treated 4×4 flush into the ground as a threshold under the gate closed that loophole for good.

Materials set how long the fence lasts. Treated pine posts last 25 to 30 years in the ground, compared with 3 to 7 years for untreated wood. Heavy galvanizing can add 5 to 10 years to fence wire in a humid climate.

Key Takeaways Before You Build

A good fence starts with the pest, not the pattern. Match the height and wire to what is eating your garden, bury an outward apron at the base, and set sturdy posts.

Do that and your DIY garden fence keeps working all season, so the lettuce stays on your plate, not the rabbit’s. Skip a step, and the fence becomes an expensive suggestion.

Give these tips a try on a small bed first, then share how it went in the comments. For more garden builds, check our related posts.

Frequently Asked Questions

What Is the Cheapest Way to Fence In a Garden?

Stakes and 1-inch poultry netting are the cheapest option for a small bed. An 8-by-12-foot bed costs roughly $51 to $76 in materials, with no digging.

Is It Cheaper to Build Your Own Fence or Buy Panels?

Building is usually cheaper. A wire fence with posts, concrete, and a gate costs about $7.60 per foot, while wood privacy panels run about $11 per foot before posts.

How Much Does 200 Feet of Fencing Cost?

Materials for 8-foot woven wire cost roughly $400 to $800 for 200 feet. Installed, the same fence runs about $1,000 to $1,400, since labor adds to the total.

What Is a No Dig Fence?

A no-dig fence is installed without post holes or concrete. Stakes, ground anchors, or surface-mounted supports hold the fence panels upright directly in the ground. The removable version I built used ten 4-foot metal U-posts, cost about $100, and came up in 20 minutes.

What Can I Use Instead of A Fence?

A living hedge, shrubs, raised borders, split rail with wire, trellises, stone walls or decorative edging can mark a boundary and add some protection to the garden.

Leave a Reply

Your email address will not be published. Required fields are marked *

About the Author

Rennick has been sketching garden layouts since before he knew that was an actual job. He’s designed everything from tiny balcony gardens to full backyard makeovers and writes for people who want their outdoor space to look great without hiring someone expensive. When he’s not drawing garden plans, he’s building stone walls or trying to convince his neighbors to rip out their lawn.

Table of Contents

Related Posts

What are You Looking For?