At the federal level, the United States doesn't have a blanket law regarding pool fencing. However, when one dives deeper into state and local jurisdictions, the answer is very often “yes”, no swimming pool fence is illegal.
Any property with a pool in California must have a property fence that is at least 5' tall, measured from the opposite side of the pool. It must also have a self-closing, self-latching pool safety gate and no RV access gates.
Safety Requirement Background Every pool in California over 18" deep needs a fence around it, per the California Safety Code.
Pool fences in California need to be 5 ft tall with gaps between fence slats of 4" or less, gaps of 2" or less under the fence, and fence gates must be self-closing and self-latching. They can be 3-sided and attached to the house or other structure, but that doesn't count as one of the listed pool safety features.
Pool Safety Walk, don't run. The number one pool safety rule is to never, ever run near a swimming pool. Listen to instructions and obey pool rules. No diving in the shallow end. No roughhousing. Don't play around drains and covers. Never swim alone. Sun safety is part of the deal. Use pool safety equipment properly.
Generally speaking for both above and inground pools, your pool should be at least 10 feet or more from your house. This rule of thumb goes for any size pool you may be considering.
A swimming pool must be located behind the building line of the dwelling house. The swimming pool water line must have a setback of at least 1m from a side or rear boundary. Typically, the pool envelope decreases the existing landscape area (turf or gardens).
To maximise your practical space surrounding the pool, consider the paved or decked area around its perimeter to be approximately 50% of the pool's surface area.
The dividing property fence – or the “boundary line” – acts as part of the pool barrier. It has a minimum height of 1800mm from the finished ground level (pool side of the barrier) all the way up to the top of the barrier. The minimum height of any pool fence or barrier should be 1200mm.
How close can you build a pool to your home? Local building codes typically require pools to be at least 5 to 10 feet away from the house foundation. Always check your county's regulations for specific requirements.