Learning, Wiring,

How to Wire an Electric Fence (6 Steps)

Electric fences are a good way to protect your garden, cattle pen, or other open land.

It can make trespassers think twice before entering your property and keeping animals safely inside the fenced area. It’s a popular choice in agricultural, commercial, and residential settings. So, how do you wire an electric fence?

Quick Summary:

  1. Install metal stakes 3-5 feet apart around the perimeter.
  2. Attach plastic hooks 4-6” above the ground on stakes.
  3. Thread galvanized steel wire around stakes.
  4. Set the grounding post and wire.
  5. Connect the wire from the grounding post to the ground knob on the electrical box.
  6. Connect the electric fence wire to the Fence knob.
  7. Power on the electrical box.

More detailed instructions with illustrations are below.

Electric Fences Getting Started

Warning indicator about electric fences
Warning indicator about electric fences [Jennifer Laffan, 2015]


Electric fences are suitable for use in various settings:

  • In agricultural settings, an electric fence can keep large and small animals securely inside or prevent them from entering.
  • An electric fence is a great deterrent for would-be trespassers in commercial and residential settings. Your garden or lawn will remain clean, the warehouse will remain safe, and no one will come onto your property uninvited.

Parts of an Electric Fence System

An electric fence system comprises 3 parts:

  • Fencing – posts, wires, insulators, and gates
  • Electronic parts – fence charger, insulated cable, and switches
  • Ground system – ground rods, clamps, and underground wiring

A wiring diagram for electrical fence
How to wire electric fence [Jennifer Laffan, 2015]


Before wiring an electric fence, the first thing is to measure the perimeter of the area it will protect.

Please have at least one foot of space between the edge and any plants nearby. Measuring the perimeter is essential to know how many stakes and how long wires you will need.


You will need the equipment in the table below to wire an electric fence.

Electric Fence SystemTools and SafetyMaterials
Electric fence wire
Electric power box
Metal stakes
Grounding post
Wire cutter
Sledgehammer or pile driver
Plastic hooks (2 per metal stake)
8 round plastic rings
8 lengths of approx. 2-foot wires (corner connectors)
Requirements for wiring an electric fence

Note: A sledgehammer is sufficient for short stakes, but I recommend using a pile driver for taller ones.

The Right Wire to Use for an Electric Fence

One important consideration before wiring an electric fence is what wire to use.

The right wire to use is one made of high-quality galvanized steel. The steel will ensure high conductivity, and being galvanized will help to prevent rust and corrosion.

Electric fencing on top of a wall
Electric fencing on top of a wall


alert sign in red

An electric fence can be dangerous to work with because it is purposely designed to give an electric shock.

Risk of electric shock sign

Only wire one when the power is turned OFF and you are confident you can wire it yourself. Avoid all possibility of getting electrocuted, as there is a high risk of electric shock. Don’t plug the electrical box into the power source until all the wiring is completed.

Only use the right tools, and follow the procedure carefully through to the end.

Also, wiring an electric fence will involve using a sledgehammer or pile driver. Use them very carefully because they can cause serious injury if used carelessly.

Wiring an Electric Fence

Step 1: Install the Metal Stakes

The first step is to install the metal stakes.

Lay them out around the area’s perimeter. Space them about three to five feet apart. Also, put two plastic hooks on each while laying them about half a foot (4-6”) above the ground. Use the round plastic pieces for all corner metal stakes.

After laying out the metal stakes, carefully drive them into the ground using a sledgehammer (or pile driver).

alert sign in red

Use the sledgehammer or pile driver carefully, as mentioned earlier under ‘Safety,’ to avoid personal injury.

Step 2: Wind and Thread the Wire

Wind the wire around each post, as shown in the picture below, starting with a corner post. Carefully unwind the electrical wire when reaching the next one.

Thread the wire between the two plastic hook prongs. Repeat until returning to the first post.

Once back at the first post, use a round plastic piece and thread a scrap piece of wire through it.

Then, thread the electrical fence wire around the round plastic piece. You can use regular plastic hooks on the corner metal stakes, but ensure the wire is tight and secure. Wrap the two ends together so that one electrical wire runs along the entire parameter.

Step 3: Set the Grounding Post

Depending on where you put your electrical box, hammer the grounding post in a suitable spot nearby.

Connect the grounding post with a piece of wire to the ‘Ground’ knob on the electrical box. It might be colored green. The grounding post is necessary to complete the electrical circuit.

Step 4: Make the Fence Connection

Do the same as you did in the previous step to connect the electrical fence to the ‘Fence’ knob on the electrical box. It might be colored red.

Step 5: Inspection

Although the fence is now wired, inspect it before giving it power.

The electrical box must NOT be plugged in during the inspection, as there’s an increased risk of an electrical shock.

Walk around the perimeter and see if there’s anything that could potentially disrupt the current flow. For example, tall grass or a stick touching the wire. Remove any such items from touching the electrical wire.

Step 6: Plug in the Electrical Box

It’s time to give electrical power to the electric fence after completing the wiring and inspection.

Plug in the electrical box. You should hear a small clicking sound to confirm it’s powered on.

alert sign in red

Don’t touch the electric fence while the electrical box is plugged into a power source! You can get an electric shock if you do. Always unplug the electrical box to remove any item from the fence.

Final Tips

Train your animals to avoid touching or going too close to the electric fence if that’s what you’re using it for, i.e., to keep the animals from leaving.

Ensure the animals are aware of the new electric fence. One tip is putting hay or grain under it to make them learn quickly.

Also, be reminded to only work on an electric fence after first switching the power off.


Website Resources:


  • Jennifer Laffan. Electric Fencing, AgGuide – A practical guide. NSW Agriculture. 2015.

Video References:

Tractor Supply Company

Zareba® Systems

How helpful was this article?

Were Sorry This Was Not Helpful!

Let us improve this post!

Please Tell Us How We Can Improve This Article.

About Robert Gibson

Robert GibsonRobert Gibson is a skilled handyman and a trusted consultant in the home improvement realm, currently spearheading content creation for ToolsWeek. With a rich background in practical hands-on projects, spanning over two decades, Robert has mastered the art of troubleshooting and solving household challenges.

Known for his knack for breaking down intricate home improvement tasks into easy-to-follow steps, Robert is a vital asset to the ToolsWeek community. His well-researched guides and insightful articles have become a go-to resource for both seasoned professionals and eager DIYers looking to enhance their skills and tackle their projects with confidence.

| Reach Me

Leave a Comment