How San Francisco Handles Fence Regulations: A Practical Guide
San Francisco maintains 177 local ordinances across all categories, and 4 of those deal specifically with fence regulations. Here is a breakdown of what the city actually requires, what is prohibited, and where San Francisco falls on the strict-to-permissive spectrum compared to other cities.
Fence Permit Requirements
San Francisco exempts fences up to 6 feet at rear and side lot lines, and up to 3 feet anywhere else on the lot, from a building permit. Taller fences need a permit under Building Code Section 106A.2.
Key details: Permit-exempt height (rear/side): Up to 6 feet. Permit-exempt height (elsewhere): Up to 3 feet. Enforcing agency: Dept. of Building Inspection. Citation: SF Building Code Β§ 106A.2.
Building a fence over the exempt height without a permit is a Building Code violation. DBI can issue a Notice of Violation, require after-the-fact permitting with plan review, and charge re-inspection and penalty fees until the fence is legalized or removed.
Height Limits
San Francisco caps fences at 3 feet in the front setback, 6 feet in side and rear yards, and 10 feet only in the rear yard under Planning Code Sec. 136(c).
Key details: Front setback max: 3 feet. Side/rear yard max: 6 feet. Rear yard only max: 10 feet. Governing code: Planning Code Sec. 136(c)(17)-(19).
Fences exceeding these caps in a required setback or yard are an unpermitted obstruction; Planning enforcement can require removal or reduction to the code height, and a variance is needed to keep a taller fence.
Retaining Walls
San Francisco requires a building permit for any retaining wall over 4 feet tall, measured footing to top, or one that holds back a surcharge or liquids.
Key details: Permit-exempt height: 4 feet or less. Measured from: bottom of footing to top of wall. Surcharge/liquid load: permit required regardless of height. Enforcing agency: SF Dept. of Building Inspection.
Building without a required permit exposes the wall to a stop-work order and Notice of Violation from the Department of Building Inspection, plus permit and penalty fees to legalize the work after the fact.
Material Restrictions
San Francisco's Building Code bars barbed-wire fencing citywide unless the Building Official and Fire Department grant written permission for narrow hazard-protection uses like guarding a dangerous area atop a tall fence.
Key details: Barbed wire: Prohibited citywide by default. Exception approval: Written OK from DBI + SFFD. Max fence height (Group R): 10 feet. Citation: SF Building Code Β§ 456.1.
Installing barbed wire fencing without the required written Building Official and Fire Department approval violates the Building Code and can bring a Notice of Violation, mandatory removal, and re-inspection fees from DBI.
This is not one of those rules that cities tend to ignore. San Francisco actively enforces its material restrictions requirements.
The Bottom Line
San Francisco's fence regulations rules are a mixed bag. Some areas are strict, others are relaxed, and the details matter. The best approach is to check the specific rule that applies to your situation rather than assuming San Francisco is broadly strict or permissive.
Keep in mind that San Francisco can amend these rules at any council meeting. For the most current version of any rule mentioned here, check the specific ordinance page, where we track updates as they happen.