Pool Safety Fence: Height, Gates, Materials and Code

A good pool safety fence fully encloses the pool on four sides, stands at least 4 feet tall, and has a gate that closes and latches by itself with the latch out of a child’s reach. That is the baseline federal health guidance gives, and most local codes build on it. This guide covers what to specify, which materials suit which yard, what to check with your city, and how to hand a contractor a clear brief.
TL;DR
- Enclose the pool on all four sides, separate from the house, with a fence at least 4 feet high. Five feet or more is better.
- Gates must be self-closing and self-latching, with the latch out of a young child’s reach.
- Keep gaps small: vertical bars no more than 1-3/4 inches apart in the model guidelines, and no footholds a child can climb.
- Codes differ by city and county. Confirm your local rules and inspection steps before you build.
- A fence is one layer. Adult supervision and a clear pool area still matter.
Table of Contents
- Why a fence around the pool matters
- The core specs of a pool safety fence
- Gates and latches: where most fences fail
- Pool fence materials compared
- Codes, permits and inspections
- What a pool fence costs
- Measuring and planning your layout
- Our perspective
- Plan your pool fence with us
- FAQ
- Sources
Why a fence around the pool matters
The CDC recommends a four-sided fence that completely encloses the pool, is at least four feet high, and has self-closing, self-latching gates. The same page recommends close, constant supervision and removing toys from the pool area when the pool is not in use, because toys draw children toward the water.
The U.S. Consumer Product Safety Commission says pool barriers can help prevent most drowning incidents involving young children ages 1 to 3. It also says a barrier is not the only method and can never replace adult supervision.
The type of fence matters too. The American Red Cross says a four-sided isolation fence with a self-closing, self-latching gate out of a child’s reach reduces a child’s drowning risk by 83% compared with three-sided property-line fencing. A fence that runs along the property line and leaves the back door opening onto the pool is the layout to avoid.

The core specs of a pool safety fence
Four sides, not three
Isolation fencing means the pool has its own enclosure, separate from the house and the yard. CPSC states that a barrier completely surrounding the pool is better than a fence on three sides with the house serving as the fourth. MedlinePlus gives the same advice: the fence should fully separate the yard and house from the pool.
If your layout makes the house wall one side of the barrier, CPSC recommends door alarms on every door that leads to the pool area. Those doors should also have self-closing and self-latching devices or locks beyond children’s reach.
Height
The floor is 4 feet. CPSC calls for a minimum of 4 feet, with 5 feet or higher preferable. The Washington State Department of Health also gives 4 feet as the minimum for an at-home barrier.
Some cities go higher. The City of Clovis, California, for example, requires pool fencing at least 60 inches high. Height is measured on the side facing away from the pool, so a raised deck or planter along the fence can reduce your effective height.
Openings and gaps
The City of Knoxville’s guidelines, which follow CPSC, say that for fences made of vertical and horizontal members, spacing between vertical members should not exceed 1-3/4 inches. That figure is based on the width of a young child’s foot, so the gap can’t become a foothold. When the horizontal rails sit less than 45 inches apart at the top, they belong on the pool side of the fence.
Many local codes also use a 4-inch sphere test: a 4-inch ball must not pass through any opening. Hampton, Virginia, applies it along with clearance limits between the ground and the bottom of the barrier. Those limits are 2 inches over solid surfaces and 4 inches over gravel or mulch.

Nothing to climb
CPSC advises placing the barrier so children cannot use nearby permanent structures or equipment to climb it. Walk the fence line and look at everything within a few feet: grill carts, air conditioner units, planters, stacked pavers, a retaining wall that raises the grade on the outside, a tree limb. Any of these can turn a 4-foot fence into a 2-foot one.
Gates and latches: where most fences fail
A fence is only as safe as its gate. The CDC says gates should be self-closing and self-latching. The Washington State Department of Health adds that the latch should be out of a child’s reach. MedlinePlus also says the gate should be kept closed and latched at all times.
Specific local codes give you numbers to work with. Clovis requires access gates to be self-closing and self-latching, with the latch at least 54 inches above grade. Hampton, Virginia, specifies the latch release height at least 54 inches above grade or on the pool side of the gate, with limits on openings near the latch.
A practical gate checklist:
- Test that the gate swings shut and latches from any open position, every time.
- Mount the latch high, or on the pool side, per your local code.
- Keep the area near the latch free of openings a child could reach through.
- Hang the gate to swing away from the pool, so a child can’t push it open from inside the enclosure.
- Check hinges and latch each season. Hinges sag, springs weaken and latches loosen over time.
If you need a wider access point for equipment, see our gate installation options.
Pool fence materials compared
The Pool Safety Foundation lists temporary mesh, vinyl, glass, traditional metal and traditional wood as the common fence types, and says every type should enclose all four sides. Here is how they compare in practice for a permanent backyard pool.
| Material | Strengths | Watch for |
|---|---|---|
| Aluminum or iron | Slim vertical pickets, see-through, strong, easy to keep gaps tight | Choose picket spacing and rail placement that meet your code |
| Vinyl | Low upkeep, clean look, solid privacy panels | Picket or lattice styles must still meet gap and climbability rules |
| Wood | Warm look, privacy, flexible design | Horizontal rails on the outside can make a ladder, so put them on the pool side |
| Glass | Unobstructed view of the pool | Needs a specialist and a code-compliant latch and hinge setup |
| Removable mesh | Can be taken down for events | Rules vary, and CPSC lists specific limits such as post spacing and bottom clearance |
For removable mesh, CPSC says the fence should be at least 48 inches high, with posts no more than 40 inches apart and the bottom no more than 1 inch above the surface. It should also be secured against removal without extensive tools.
Which one fits your yard
Ornamental aluminum or iron is a natural choice around a pool. Vertical pickets leave you a clear line of sight to the water from the patio or kitchen, and the spacing is easy to hold to a tight standard. See our aluminum and iron fencing page.
Vinyl suits families who want privacy and almost no maintenance. Our vinyl fence installation covers residential styles.
Wood works when you want the pool area to blend with a fenced backyard. Build it with the framing on the pool side and keep board spacing tight.
Codes, permits and inspections
Federal agencies publish guidelines. Your city or county writes the law. Requirements for height, latch placement, ground clearance and inspections differ from place to place. Clovis, for instance, requires the fence and alarm inspection before the pool is plastered or filled. Another jurisdiction may set a different sequence.
Before you sign a contract:
- Call your city or county building department and ask for the residential pool barrier requirements in writing.
- Ask whether a permit is needed for the fence itself, and when inspections happen.
- Ask about your HOA’s rules on fence style and height, since they can add to code, though they can’t lower it.
- Ask whether your house wall may serve as part of the barrier, and what door alarms or locks are required if so.
Bring the printed requirements to your contractor so the quote matches what the inspector will check.
A safety cover is a different layer
The Washington State Department of Health says a power safety cover must meet ASTM standard F1346, and that if it does, additional barriers may be optional, subject to your local building department. A cover protects the water surface. A fence protects the whole pool area. Many households use both.
What a pool fence costs
Price depends on linear footage, material, number of gates, terrain, and whether the ground needs grading or footings. Corners and slopes add labor. Gates, and any specialty hardware, add cost.
For our own work, we list vinyl fencing at $25 to $45 per linear foot and wood fencing at $20 to $40 per linear foot. Aluminum and iron pricing depends on the design, so we quote it after a site visit. A fence along a single line is rarely the whole job: a full enclosure means measuring all four sides, and most homeowners need several quotes to compare. Our estimates are free.
To estimate your own budget, measure the perimeter of the enclosure in feet, count the gates, and note any slopes or retaining walls on the line.
Measuring and planning your layout
- Decide the enclosure line. Leave room around the pool for a deck, chairs and safe walking. A fence set too tight to the water edge makes the area cramped and hard to maintain.
- Account for the house. If a wall of the house forms part of the barrier, plan the door alarms or self-closing, self-latching doors CPSC recommends.
- Check grade changes. Slopes leave gaps under the fence. Your fence has to hold the clearance limit across the entire run.
- Mark the gates. Place them where people naturally walk, and keep them away from steps or ledges that could hold a child up to reach the latch.
- Clear the outside. Move planters, furniture and equipment away from the fence so nothing becomes a step.
- Plan for upkeep. Lubricate hinges, test latches, trim plants and tighten hardware regularly.
Our perspective
We build fences for a living, and we see the same pattern on pool jobs: the fence itself is rarely the weak point. The gate, the latch and the ground line are.
Every project we do is built by our own licensed crew, with no subcontractors. On a pool enclosure that matters, because the details that decide safety (post depth, gate hang, consistent gaps, clearance at the ground) get decided on site by the people holding the tools. When the same crew that measures also builds, those details don’t get lost between a sales visit and an install.
Our advice is to treat the fence as part of the whole backyard plan. The patio, retaining walls, grading and fencing all affect each other. A retaining wall that raises the grade outside the fence can cut its effective height. A new paver patio can bring furniture closer to the barrier. Planning them together avoids rework.
Get your local code requirements first, then call us for a free estimate. We will price the build around what your building department requires.
Blog
Plan your pool fence with us
A&E Hardscape is a licensed general contractor serving homeowners across Utah, from Cedar City to Park City. We install vinyl, wood, aluminum and iron fencing with an in-house crew, and we also handle the work around the pool, such as patios, retaining walls and grading. Send us your layout and your city’s requirements, and we will walk the site and give you a free estimate.

If you are also planning shade or an outdoor living area near the pool, our pool house and outdoor structure builds can be planned alongside the fence.
FAQ
How high should a pool safety fence be?
The CDC and the Washington State Department of Health both say at least 4 feet. CPSC calls 4 feet the minimum and 5 feet or higher preferable. Some cities require more, such as 60 inches in Clovis, California, so check your local code.
Does a pool fence need a self-closing gate?
Yes. The CDC recommends self-closing and self-latching gates, and the latch should be out of a child’s reach. Many local codes set a minimum latch height, often 54 inches above grade, so confirm the number with your building department.
Can the house serve as one side of the pool barrier?
It is better to enclose the pool completely. CPSC says a full barrier is preferable to a three-sided fence using the house wall. If the house must serve as one side, CPSC recommends alarms on all doors leading to the pool, plus self-closing, self-latching devices or locks out of children’s reach.
Is a fence enough to keep children safe?
A fence is a major layer, but not the only one. CPSC states barriers can never replace adult supervision, and the CDC recommends close, constant supervision and keeping toys out of the pool area when it is not in use.
Do I need a permit for a pool fence?
Often yes, and many jurisdictions require an inspection. Rules vary by city and county, so call your local building department before construction and ask what is required and when the inspection happens.
Sources
- Preventing Drowning, CDC
- Safety Barrier Guidelines for Residential Pools, CPSC
- Water safety and drowning, MedlinePlus
- Pool Safety, Washington State Department of Health
- Home Swimming Pool & Hot Tub Safety, American Red Cross
- Residential Swimming Pool Barriers Guidelines, City of Knoxville
- Pool Barrier Affidavit of Requirements, Hampton, Virginia
- Chapter 8.10 Swimming Pools, City of Clovis
- Pool Safety Equipment: Pool Barriers, Pool Safety Foundation
