FENCE RULES – SAN FRANCISCO (CITY), CALIFORNIA
OVERVIEW
San Francisco distinguishes required setbacks, yards and usable open space when regulating fences. The current Planning Code permits three-foot fences in those areas, with separate allowances for qualifying decorative open railings and taller yard fencing. A ten-foot yard allowance does not apply automatically to required usable open space or establish a Building permit exemption. Current yard rules also differ from formulas in the City’s January 2019 fence handout. Confirm the actual parcel, required areas, grade, construction classification, lawful older work and pool protection with Planning and Building Inspection. This guide concerns the City of San Francisco, California, not South San Francisco. Updated November 2026.
| Quick question | San Francisco answer |
|---|---|
| Permit or approval | Building exemption: all fences not over three feet, and fences not over six feet at rear and side lot lines at the rear of the property. Confirm the precise assembly, Planning compliance and any other approval. |
| Typical fence height | Three feet in required setbacks, yards and usable open space; separate qualifying decorative six-foot and yard six-/ten-foot allowances have different scope. Ten feet is not a universal open-space allowance. |
| Placement & property lines | Have Planning identify the actual required areas, legislated lines and grade. Verify legal boundaries, easements, access and public-right-of-way requirements. |
| Common fence materials | Wood: check actual height and area. Vinyl/PVC: confirm the complete design. Chain-link: wire mesh is excluded from the decorative six-foot grille-work allowance; other applicable rules still require classification. |
| Important local conditions | Fence rules may be further affected by overlapping yard/open-space categories, current setback rules, grade and retaining layouts, special design controls, lawful older work, public access, pools and private restrictions. |
| Official local resource | San Francisco Planning Code: Section 136 |
The detailed sections and official links below explain the conditions behind these short answers.
GOVERNANCE
The Board of Supervisors adopts local ordinances for San Francisco’s consolidated City and County government. Planning and the Zoning Administrator administer land-use requirements, the Department of Building Inspection handles construction requirements, and Public Works handles public-right-of-way issues. Start with the current Planning Code fence provisions in Section 136.
Identify the zoning district, required front setback, any required side and rear yards, required usable open space, buildable area and special controls. These are different categories, even where they overlap on a drawing. Have Planning mark the applicable areas before choosing a height or moving a fence.
The official fence handout is dated January 2019, although the City still serves it. Its illustrations can help explain the layout, but its older front- and rear-yard formulas are not the current rules summarized below. The 2025 San Francisco Building Code, incorporating the California Building and Residential Codes with local amendments, became operative January 1, 2026. Confirm the requirements governing the actual application.
PERMIT AND APPROVAL REQUIREMENTS
• Building permit exemption: Current Section 106A.2 exempts fences not over six feet at the rear and side lot line at the rear of the property, and all fences not over three feet. The rear-location wording matters: it is not a blanket exemption for every six-foot side fence or a generic seven-foot California rule. Have DBI classify the proposed location and complete assembly.
• Separate Planning compliance: A Building permit exemption does not waive Planning requirements or other applicable permits. Conversely, a Planning height allowance does not establish a construction exemption. Confirm review and notice requirements for the actual design rather than assuming the dated handout guarantees current over-the-counter approval.
• Retaining walls and pool barriers: The construction exemption for retaining walls not over four feet measures from the bottom of the footing to the top and has surcharge and specified liquid conditions. A fence on a retaining wall, powered gate or pool enclosure needs its own classification. Ordinary fence exemptions do not settle pool-protection requirements.
• Other approvals: Check historic or special design controls, recorded easements, access and any Public Works encroachment permit before work in or near the public right-of-way. A private property line, curb and public-right-of-way boundary are not interchangeable.
• Hired fence work: Verify the contractor’s applicable license and scope. The Business and Professions Code 7048 exception covers casual, minor or inconsequential work below $1,000 in aggregate labor, materials and other costs only when no building permit is required and no one is employed to perform or assist. It excludes work that is part of a larger operation, splitting projects to fit the limit, and persons advertising as contractors or qualified to contract. It is not an exemption for every low-cost fence job.
FENCE PLACEMENT RULES
• Required front setback: Current Section 132 generally uses the shortest adjacent front setback in the listed residential districts, with separate half-adjacent rules for specified one-neighbor and corner situations. Its ordinary maximum is ten feet, with a qualified fifteen-foot exception and district-specific rules. Ask Planning to establish the actual line; do not use the 2019 handout’s old average-adjacent or fifteen-percent formula.
• Legislated setback lines: Section 131 preserves legislated setback lines and allows only the applicable permitted obstructions. Where a legislated line and a required front setback both apply, the more restrictive requirement controls. Moving a fence does not itself erase a legislated line.
• Side and rear yards: Section 133’s ordinary required side-yard rules concern RH-1(D) lots and vary with lot width; they are not a Citywide five-foot fence setback. Current Section 134 generally uses thirty percent of lot depth, with a fifteen-foot minimum, for its listed RH, RM-1, RM-2, RTO-1 and RTO-M districts, and twenty-five percent with that minimum for other listed districts, subject to their actual conditions. Have Planning confirm the parcel’s required yard rather than applying an old forty-five-percent formula.
• Open-space classification: A required yard can also contain required usable open space. Section 136’s six-foot fence and windscreen allowance reaches both categories, while its ten-foot allowance reaches yards only. Do not assume a fence permitted as a yard obstruction also complies with required usable-open-space standards.
• Boundary and access: Establish legal boundaries and preserve easements, drainage and access. Public Works considers fences in the public right-of-way through its encroachment process; an existing fence or a neighbor’s consent does not establish public approval.
• Shared fences: California Civil Code 841 presumes adjoining landowners benefit equally from a dividing fence and, absent a contrary written agreement, share reasonable construction, maintenance and necessary replacement costs. The presumption is rebuttable, not a right to choose an expensive upgrade and automatically bill a neighbor for half. Before incurring covered costs, give each affected adjoining owner thirty days’ prior written notice stating the presumption, the problem, proposed solution, estimated costs, proposed sharing and timeline.
A court can reduce or eliminate a contribution if the presumption is rebutted by a preponderance of the evidence. It considers disproportionate benefit or burden, cost compared with added property value, proven financial hardship, unreasonable or excessive expense, personal aesthetic preferences and other equitable factors. The statute’s landowner definition excludes public bodies. Public approval does not resolve ownership or authorize removal of someone else’s property.
• Before digging: Use USA North 811’s California utility-location guidance before post holes and check responses and markings. Private irrigation and other owner-installed lines may need a private locator. California’s owner exceptions include a residential owner, not acting as a licensed contractor, improving the principal residence or its appurtenances through excavation that does not require a permit, and an owner contracting with a licensed contractor for permit-exempt excavation. Those exceptions do not excuse a hired excavator’s own duties; locating utilities remains sound safety practice.
Covered excavators delineate the work area and ordinarily notify at least two working days, and no more than fourteen calendar days, before excavation, excluding the notice day from the two-working-day count. Obtain an actual ticket, observe its legal start and operator responses, and preserve markings. Tickets generally remain valid twenty-eight calendar days from issuance and must be revalidated before expiration if work continues. Follow the exact-location and safe-exposure requirements; the tolerance zone generally extends twenty-four inches from each outside edge of the installation. On discovering or causing damage, immediately notify the operator. Call 911 first when Government Code 4216.4(c)(1) requires it, including a gas or hazardous-liquid pipeline releasing flammable, toxic or corrosive gas or liquid, or damage to a high-priority installation, subject to its narrow operator-maintenance exception. Notify the regional notification center within forty-eight hours unless the statutory exception applies.
FENCE HEIGHT AND VISIBILITY RULES
• Three-foot baseline: Section 136(c)(17) permits fences not exceeding three feet above grade in required setbacks, yards and usable open space. Apply the relevant table column and any special controls, not a height selected solely from an illustration.
• Decorative open construction: Section 136(c)(16) separately permits decorative railings and grille work, other than wire mesh, up to six feet above grade when at least seventy-five percent open to perpendicular view. This is not a generic six-foot chain-link allowance or permission to stack three feet of solid fencing beneath another three feet of fencing. Have Planning classify the actual design.
• Yard and open-space heights: Section 136(c)(18) permits fences and windscreens up to six feet above grade in yards and usable open space. Section 136(c)(19) permits them up to ten feet above grade in yards only. Neither is a general ten-foot front-setback rule, and Building permit requirements remain separate.
• Grade and retaining layouts: The ordinary provisions state height above grade. Show both existing grade profiles and the proposed retaining arrangement to Planning and DBI, especially on unequal-grade lots. Do not substitute a building-height datum, assume a lower-side or average-grade fence formula, or treat a retaining wall as an automatic platform for extra fence height.
• Deck-specific exception: Section 136’s additional fence or windscreen allowance associated with specified permitted decks or building extensions has its own offset and transparency conditions. It is not an extra six feet for every garden fence. Obtain classification of the actual deck and enclosure before relying on that provision.
• Visibility: Keep street, alley and driveway access safe and confirm the applicable clear-view requirements with Planning and Public Works. Do not use a neighboring city’s numerical triangle or presume that the ordinary fence-height allowance authorizes an obstruction at a particular access point.
• Spite fences: Civil Code 841.4 treats an unnecessarily over-ten-foot fence or fence-like structure maliciously erected or maintained to annoy an adjoining owner or occupant as a private nuisance. Ten feet is not a zoning allowance.
MATERIAL AND CONSTRUCTION LIMITS
• Materials: Check wood, vinyl/PVC, chain-link, metal and masonry against the actual area, design, openness and construction requirements. In particular, wire mesh is excluded from the decorative-railings and grille-work allowance described above. A material’s availability does not establish approval of its height or location.
• Lawful older fences: Section 180 provides qualified continuation for a structure that existed lawfully when a rule change made it noncomplying. A change of ownership alone does not terminate that status, but other requirements remain. An old fence is not necessarily lawful simply because it has stood for many years.
• Positive maintenance and repair: The Zoning Administrator’s January 2026 interpretations expressly recognize maintenance and repair of a legal noncomplying structure without expansion. Have Planning determine whether the proposed fence work is maintenance, repair or replacement and confirm its lawful status before removal. The interpretations distinguish replacement within required yards from other situations; they do not give every older fence an unconditional same-location rebuilding right.
Do not apply a cost formula for a structure occupied by a nonconforming use to every noncomplying residential fence. Replacing a complete fence, increasing its discrepancy, or changing its location can require a different decision from routine upkeep. Ask Planning to apply the current ordinance and official interpretations to the actual scope.
• Pool and spa protection: Confirm the current DBI-approved barrier and safety-feature arrangement for the actual pool, spa and home use. A permitted yard fence or an ordinary construction exemption does not establish pool compliance. Do not rely on the 2019 fence handout as a current pool-hardware design.
For covered construction or remodeling of a pool or spa at a private single-family home, California generally requires at least two qualifying drowning-prevention features, subject to statutory exceptions and distinct licensed-child-care rules. The Act covers qualifying recreational-water structures containing water more than eighteen inches deep, including spas and hot tubs. Alternatives include a compliant isolation enclosure, qualifying removable mesh fencing, an approved safety cover, exit alarms, qualifying self-closing and self-latching home doors, a qualifying water alarm, or independently tested equivalent protection. Each feature must meet its actual technical standard. An exit alarm and latch on the same door, an exit alarm and latch on separate doors, or a safety cover and the specified water alarm do not make a qualifying two-feature pair. Final inspection is required.
A statutory isolation enclosure must be at least sixty inches high, with no more than two inches of ground clearance and no opening passing a sphere four inches or larger. Its outside must not provide handholds or footholds enabling a child under five to climb over. Gates must open away from the pool, self-close and self-latch, with the latch at least sixty inches above ground. That differs from the fifty-four-inch release height for the separate qualifying home-door feature. Licensed family child-care homes with in-ground pools have additional isolation, protective-feature, documentation and inspection requirements. An ordinary perimeter fence alone does not establish pool compliance.
PRIVATE RESTRICTIONS
Recorded covenants, association design standards, private easements and boundary agreements may restrict a fence independently of public requirements. Obtain any required private approval separately. A public permit does not override recorded access rights or settle ownership.
Where association governing documents require approval of a physical change, Civil Code 4765 requires a fair, reasonable and expeditious process, good-faith decisions consistent with law, and all decisions in writing, including approvals. The procedure must provide prompt deadlines and state the maximum response time for an application or board reconsideration request. A denial must explain its reasons and the applicable reconsideration procedure. The statute does not create automatic approval or one universal deadline for every fence request.
REVIEW AND ENFORCEMENT CONTEXT
Fence issues are typically reviewed during permit or approval review when required, and through complaint-based code enforcement. Examples include:
• Actual setbacks, yards and usable open space; decorative openness and wire-mesh classification; height above grade; retaining arrangements; safe access and public-right-of-way encroachment.
• Building and Planning approval, lawful older-fence status and repair scope, current pool protection, shared-fence costs, excavation and separate private restrictions.
USING THIS INFORMATION
This page provides general orientation on how residential fence rules are structured and applied within the City of San Francisco, California. Updated November 2026.
In addition to local fence rules, certain California laws apply statewide. See Statewide Fence Laws in California.
It is not legal advice and does not replace official statutes, regulations, ordinances, orders, permits, surveys, recorded documents or professional guidance. Rules and interpretations may change. Applicable requirements depend on the property’s actual location, the authority responsible for each issue, current adopted codes and amendments, zoning and site conditions, rights-of-way, easements, drainage and floodplain conditions, historic or design districts, pool and home uses, agricultural and livestock conditions, shared-fence rights, excavation and private restrictions. Government approval does not resolve ownership, private agreements or recorded access rights. If this page conflicts with controlling law or official requirements, the controlling authorities govern.