Build Your Own DIY Garden Fence

Updated on April 3, 2020
Learning in Life profile image

Megan has been writing on all kinds of topics since 2012. Her main interests include alternative medicine, running, gardening, and her kids.

A few months ago, we started working on our square foot garden. We built our own raised garden beds, put a weed barrier down, and mulched all the walkways. It was gorgeous. I even put a little 2-foot, store-bought fence up to keep the dog out—and for looks. The dog made it over the little fence, and started tearing everything up and digging through the weed barrier. I was so upset that I started looking at garden fences online.

I only needed about 20 feet across and about 3 feet high. Everything I found either looked crappy, or it was going to run a couple hundred dollars. So, we built one ourselves with a fully functional gate. Here’s how we did it.


  • (2) 4x4x8 ($6.77 each)
  • (6) 2x4x8 ($3.47 each)
  • (15) 4 inch x 6 foot pickets ($1.08 each)
  • (2) 3 1/2-inch hinges with hardware ($2.78 each)
  • (1) sliding lock “barrel bolt” with hardware ($3.98)
  • (1) 50-pound fast-setting Quikcrete ($4.90)
  • (96) 1/2- or 2-inch nails (I had these on hand)
  • (16) 3-inch screws (I had these on hand)

Total Cost at Lowe's: $65 for a 20-foot-long, 3-foot-high fence with a 4-foot gate.

Each additional 8 feet of fence would cost roughly $21.42, plus the cost of screws and nails.


  • Post hole digger
  • Hammer
  • Screwdriver or drill
  • Shovel
  • Level
  • Saw

1. Cut Your Wood

Cut each of your 4x4s and your pickets in half. This will give you 4-foot 4x4s and 3-foot pickets. The reason you need the 4x4 to be longer is that you need to be able to bury 1/3 of the length that will be above ground. This means 1 foot buried and 3 feet as your fence post. This gives you a 3-foot fence.

Wait until you have gotten past the post of attaching the 2x4s to the post to cut your pieces for the gate frame. You may have to adjust for the amount of space left. You will need to measure the distance of the opening of your gate to cut the other two pieces.

2. Dig Post Holes

Since we are building a 20-foot fence, we dug the post holes 8 feet apart for the main fence portion and 4 feet apart for the gate. The same spacing can be used if you are building a longer fence. The holes can be quickly dug with a post hole digger. We dug ours about 8x8 inches and 1 foot deep.

3. Place Posts

Place your 4x4 with the cut end down and centered on the hole. Make sure you look down the line of posts to make sure they are even.

4. Pour Cement

Pour 1/4 of the cement bag in each hole. Use the end of a shovel to evenly distribute it.

Fill the hole with water, anything extra will seep out into the ground—but you want enough to fully soak the cement. Use the tip of the shovel handle to mix the cement with the water.

Let it set for 20–30 minutes, and then fill the rest of the hole with the dirt you dug out.

5. Attach 2x4s

The 2x4s will serve as the fence panel frame. They should be attached a few inches from the ground and a few inches from the top of the 4x4. We used a 2x4 as a spacer for the bottom one and eyeballed the top. If your ground has no slope to it, you can use a level. Ours was a bit sloped, so we just followed the ground.

Attach the 2x4s with 2 screws on each end to the outside part of the posts. You will want them to only overlap the gate posts about halfway (see picture above).

At this point, go back and cut your gate 2x4 pieces.

Go ahead and screw the 2x4s for the gate into their spot. This will ensure they are the right size and makes it easier to install the hinge later.

6. Attach Pickets

Start from one side and nail a picket into the 2x4. Make sure the side is even with the edge of your post. If you are butting the fence up to something like we did, make sure the picket is even with the house or other fence.

Once the first picket is in place, the rest should be easy. Use one of your other pickets as a spacer if you want it to have the same look as ours. Just push a picket up to the one that is already installed like you would if you were going to attach it. Take another picket and do the same. But, only nail down the second one. Remove your spacer picket and repeat.

Once you get down to the gate post, stop attaching pickets.

7. Install Hinge

The hinge will need to be installed in the direction it has the most movement. One direction will only rotate back most of the way. The other direction will fold all the ways to the other piece.

Fold it up and install it in the same direction as you want to hinge to swing. The fold should come towards you as you are looking at it. Make sure the center of the hinge is at the spot where your (2) 2x4s come into contact with each other.

8. Finish Pickets

Once you have the hinge installed, you should be able to keep going down the fence with the pickets as before. It’s OK if the pickets overlap the hinge piece a little bit, as long as they don’t cross the center part that needs to rotate. You can always adjust your spacing by a little to accommodate. Also, make sure you adjust the location of your nail—so it won't go through the hinge.

9. Install Lock

Installing the lock is actually quite simple. The one I got came with the screws. So, you need to lock it so the bolt is through the individual piece. This makes it so you know how far apart to put them. Just make sure you screw in one piece on the gate portion and one piece on the fence portion.

That’s it! Now you have your very own DIY garden fence! I love mine! What do you think?

This content is accurate and true to the best of the author’s knowledge and is not meant to substitute for formal and individualized advice from a qualified professional.


    0 of 8192 characters used
    Post Comment
    • profile image

      Tina Hamlin 

      13 days ago

      How long did it take to build the fence?


    This website uses cookies

    As a user in the EEA, your approval is needed on a few things. To provide a better website experience, uses cookies (and other similar technologies) and may collect, process, and share personal data. Please choose which areas of our service you consent to our doing so.

    For more information on managing or withdrawing consents and how we handle data, visit our Privacy Policy at:

    Show Details
    HubPages Device IDThis is used to identify particular browsers or devices when the access the service, and is used for security reasons.
    LoginThis is necessary to sign in to the HubPages Service.
    Google RecaptchaThis is used to prevent bots and spam. (Privacy Policy)
    AkismetThis is used to detect comment spam. (Privacy Policy)
    HubPages Google AnalyticsThis is used to provide data on traffic to our website, all personally identifyable data is anonymized. (Privacy Policy)
    HubPages Traffic PixelThis is used to collect data on traffic to articles and other pages on our site. Unless you are signed in to a HubPages account, all personally identifiable information is anonymized.
    Amazon Web ServicesThis is a cloud services platform that we used to host our service. (Privacy Policy)
    CloudflareThis is a cloud CDN service that we use to efficiently deliver files required for our service to operate such as javascript, cascading style sheets, images, and videos. (Privacy Policy)
    Google Hosted LibrariesJavascript software libraries such as jQuery are loaded at endpoints on the or domains, for performance and efficiency reasons. (Privacy Policy)
    Google Custom SearchThis is feature allows you to search the site. (Privacy Policy)
    Google MapsSome articles have Google Maps embedded in them. (Privacy Policy)
    Google ChartsThis is used to display charts and graphs on articles and the author center. (Privacy Policy)
    Google AdSense Host APIThis service allows you to sign up for or associate a Google AdSense account with HubPages, so that you can earn money from ads on your articles. No data is shared unless you engage with this feature. (Privacy Policy)
    Google YouTubeSome articles have YouTube videos embedded in them. (Privacy Policy)
    VimeoSome articles have Vimeo videos embedded in them. (Privacy Policy)
    PaypalThis is used for a registered author who enrolls in the HubPages Earnings program and requests to be paid via PayPal. No data is shared with Paypal unless you engage with this feature. (Privacy Policy)
    Facebook LoginYou can use this to streamline signing up for, or signing in to your Hubpages account. No data is shared with Facebook unless you engage with this feature. (Privacy Policy)
    MavenThis supports the Maven widget and search functionality. (Privacy Policy)
    Google AdSenseThis is an ad network. (Privacy Policy)
    Google DoubleClickGoogle provides ad serving technology and runs an ad network. (Privacy Policy)
    Index ExchangeThis is an ad network. (Privacy Policy)
    SovrnThis is an ad network. (Privacy Policy)
    Facebook AdsThis is an ad network. (Privacy Policy)
    Amazon Unified Ad MarketplaceThis is an ad network. (Privacy Policy)
    AppNexusThis is an ad network. (Privacy Policy)
    OpenxThis is an ad network. (Privacy Policy)
    Rubicon ProjectThis is an ad network. (Privacy Policy)
    TripleLiftThis is an ad network. (Privacy Policy)
    Say MediaWe partner with Say Media to deliver ad campaigns on our sites. (Privacy Policy)
    Remarketing PixelsWe may use remarketing pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to advertise the HubPages Service to people that have visited our sites.
    Conversion Tracking PixelsWe may use conversion tracking pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to identify when an advertisement has successfully resulted in the desired action, such as signing up for the HubPages Service or publishing an article on the HubPages Service.
    Author Google AnalyticsThis is used to provide traffic data and reports to the authors of articles on the HubPages Service. (Privacy Policy)
    ComscoreComScore is a media measurement and analytics company providing marketing data and analytics to enterprises, media and advertising agencies, and publishers. Non-consent will result in ComScore only processing obfuscated personal data. (Privacy Policy)
    Amazon Tracking PixelSome articles display amazon products as part of the Amazon Affiliate program, this pixel provides traffic statistics for those products (Privacy Policy)
    ClickscoThis is a data management platform studying reader behavior (Privacy Policy)