Do I Need a Permit for a Fence in San Francisco, CA?

San Francisco fence permitting follows California's framework more than any single city's local rules — the California Building Code sets height limits by yard location that apply statewide, and SF's own Planning Code adds neighborhood-specific requirements on top. The headline rule: fences 6 feet or under in most yard locations don't require a DBI building permit, but they are still subject to SF Planning Code regulations that can restrict height, materials, and location in ways that surprise homeowners who assume no permit means no rules. California's Good Neighbor Fence Law (Civil Code §841) adds an important neighbor-notification dimension to any San Francisco fence project, and San Francisco's extremely dense residential fabric — with shared walls, narrow lots, and rear yards that serve as light and air for multiple households — makes fence disputes a common neighborhood friction point.

Research by DoINeedAPermit.org Updated April 2026 Sources: SF Department of Building Inspection (DBI), SF Planning Code, California Building Code (CBC) 2022, California Civil Code §841 (Good Neighbor Fence Law), SF Planning Information Center
The Short Answer
MAYBE — fences 6 feet or under don't require a DBI building permit; fences over 7 feet require a permit; SF Planning Code rules apply regardless.
San Francisco DBI does not require a building permit for fences up to 6 feet in height in side and rear yards. A DBI permit IS required for fences over 7 feet in height. Fences between 6 and 7 feet occupy a gray zone that depends on yard location and specific Planning Code provisions. Regardless of permit status, all fences must comply with the SF Planning Code's height limits by yard location: front yards typically limited to 4 feet, rear and side yards typically up to 6 feet (with some exceptions). Fences in designated historic districts require SF Historic Preservation Commission (HPC) review. California's Good Neighbor Fence Law requires neighbors to share costs of commonly benefiting boundary fences and mandates prior written notice before installing or removing a boundary fence. Confirm current requirements with DBI at (628) 652-3700 before starting any fence project.

San Francisco fence rules — the basics

San Francisco fence regulation operates through two parallel systems: the DBI building permit requirement (triggered by structural work beyond a certain height) and the SF Planning Code's zoning rules (which apply regardless of permit status). A fence that doesn't need a DBI building permit can still violate the Planning Code's height limits, setback requirements, or neighborhood character standards, resulting in a Code Enforcement action requiring modification or removal. Understanding both systems before installing a fence is essential in San Francisco.

The DBI building permit thresholds for fences in San Francisco follow California's residential code framework. Fences 6 feet or under in height do not require a DBI building permit. Fences over 7 feet require a DBI building permit. The 6–7 foot range is a gray zone — the California Building Code technically considers fences between 6 and 7 feet to fall into a zone where the permit requirement depends on location, jurisdiction, and specific construction type. When in doubt, confirming with DBI at (628) 652-3700 or at the DBI Permit Center at 49 South Van Ness is the recommended approach.

The SF Planning Code governs fence heights by yard location, applying regardless of whether a DBI permit is required. In most residential zoning districts, the Planning Code allows fences up to 6 feet in height in rear and side yard areas and limits front yard fences to 4 feet or less. Some neighborhoods have specific area plans or design guidelines with different limits — the Castro, Duboce Triangle, and Mission districts all have neighborhood-specific character guidelines that address fence materials and heights. SF Planning's information line at (628) 652-7600 and the Planning Code search tool at sfplanning.org provide zoning-specific guidance for a specific property address.

California's Good Neighbor Fence Law (Civil Code §841) is a significant California-specific dimension of any San Francisco boundary fence project. The law establishes that owners of adjacent properties share both the responsibility for and the cost of maintaining boundary fences that benefit both properties. Before removing or substantially replacing a fence on a shared property line, a property owner must provide the adjacent neighbor with 30 days' written notice of the proposed work, including the scope and estimated cost. If the neighbor doesn't object, the work can proceed and the neighbor shares cost proportionally. If the neighbor objects, the dispute may need to be resolved through the courts or mediation. This California law applies statewide and is enforced through civil action rather than building code enforcement — DBI doesn't administer it, but a fence that violates the Good Neighbor Fence Law can result in civil litigation.

Not sure whether your SF fence needs a permit?
Get a permit report for your address — permit threshold determination, Planning Code height limits, Good Neighbor Fence Law notice requirements, and historic district review guidance.
Get Your SF Permit Report →
$9.99 · Based on official city sources · Delivered in minutes

Why the same fence in three San Francisco neighborhoods gets three different outcomes

Scenario A
Outer Sunset rear yard — 6-foot wood fence, no DBI permit, Planning Code compliant
A homeowner in the Outer Sunset replaces the aging 6-foot wood board-on-board fence in their rear yard along the back property line. The fence runs at the maximum 6-foot height — no DBI building permit required (under the 6-foot threshold). The fence is in the rear yard; front yard fence height is not at issue. Before installation, the homeowner sends the required 30-day written notice to the adjacent neighbor per California Civil Code §841 — the neighbor confirms they're happy with the replacement. The contractor replaces the existing fence in place along the established property line. No permit fees. No Planning Code issues (6-foot rear yard fence is allowed in this zoning). Total project cost: $4,500–$8,000 for 80 linear feet of 6-foot cedar fence in San Francisco's market (significantly higher than the same fence in Indianapolis due to SF labor costs).
DBI permit: None (6 ft or under) | 30-day neighbor notice required | Project cost: $4,500–$8,000
Scenario B
Noe Valley — 8-foot sound barrier requested: DBI permit + Planning review
A Noe Valley homeowner wants an 8-foot fence along the side of their property adjacent to a busy pedestrian alley. The 8-foot height requires a DBI building permit. SF Planning Code review is also triggered — 8 feet exceeds the standard 6-foot rear/side yard maximum, requiring either a Planning Code variance or a Zoning Administrator's determination that the fence qualifies for an exception. Fences taller than the Planning Code limit may be approved for legitimate reasons (noise mitigation, safety) through the Planning Department's discretionary review process. The homeowner files a DBI permit application and coordinates with SF Planning — SF Planning reviews the project under Residential Design Guidelines. Planning determination: the 8-foot height requires a conditional use authorization or minor variance, adding 3–6 months to the approval timeline. Total timeline: Planning (3–6 months) + DBI plan check (4–6 weeks). DBI fee: approximately $350. Project cost: $7,000–$12,000 for the 8-foot fence.
DBI permit required (8 ft) | Planning variance: 3–6 months | Project cost: $7,000–$12,000
Scenario C
Alamo Square historic district — HPC review for fence on contributing Victorian
A homeowner in the Alamo Square historic district with a contributing Victorian wants to install a 4-foot ornamental iron fence at the front property line. Fences on contributing structures in SF's locally designated historic districts require SF Historic Preservation Commission review. A front yard ornamental iron fence on a Victorian was a common period feature and typically aligns well with HPC design guidelines — Victorian-era iron fence styles are generally approved. Staff-level HPC review (no full hearing): approximately 3–4 weeks. After HPC clearance, a DBI permit is filed if the fence height requires one (4-foot front fence is under the DBI threshold). Front yard fences in most SF residential districts are limited to 4 feet by the Planning Code — this fence is at the maximum permitted front yard height. Total permit fees: HPC application fee. Project cost for ornamental iron fence (hand-forged or pre-fabricated Victorian-style): $6,000–$15,000 for 60 linear feet, depending on ironwork quality.
DBI permit: None (4 ft or under) | HPC staff review: 3–4 weeks | Victorian iron style approved | Project cost: $6,000–$15,000
FactorOuter Sunset (6 ft rear)Noe Valley (8 ft)Alamo Square (Historic)
DBI permit required?No — 6 ft or underYes — over 7 ftNo (4 ft) + HPC review
Planning Code compliance?Yes — 6 ft rear yard OKVariance required — 8 ft exceeds limitYes — 4 ft front yard OK
HPC historic review?NoNoYes — contributing Victorian
Good Neighbor notice?Yes — 30 days beforeYes — 30 days beforeYes — if on property line
TimelineNotice period + installation3–6 months Planning + DBI3–4 weeks HPC staff
Permit feesNone~$350 DBI + Planning feesHPC application fee
Project cost$4,500–$8,000$7,000–$12,000$6,000–$15,000
Your SF property has its own combination of these variables.
Fence height and yard location. Planning Code limits for your zoning district. Historic district review. Good Neighbor Fence Law notice obligations. The specific compliance path for your San Francisco fence project.
Get Your SF Permit Report →
$9.99 · Based on official city sources · Delivered in minutes

California's Good Neighbor Fence Law — the notice requirement that surprises SF homeowners

California Civil Code §841 establishes the Good Neighbor Fence Law, which applies to boundary fences throughout California — including all San Francisco residential properties. The law has three key provisions that SF homeowners frequently overlook. First, owners of adjoining parcels share equally in the cost and responsibility of maintaining boundary fences unless a different agreement is made in writing. Second, an owner who wishes to construct or replace a shared boundary fence must provide the adjacent neighbor with 30 days' written notice of the proposed work, delivered via personal delivery or first-class mail, describing the work, the estimated cost, and the date work is expected to begin. Third, if the neighbor fails to respond within 30 days, they are deemed to have consented to the construction and will share in the cost.

The notice requirement has practical implications for any San Francisco fence project on a shared property line. A homeowner who starts fence replacement work without providing the 30-day written notice has violated California law and may face a civil claim from the neighbor — regardless of whether the fence itself is otherwise legal and permitted. In San Francisco's dense residential environment, where shared boundary fences often serve as the primary privacy and sound barrier for multiple households, the Good Neighbor Fence Law disputes can be consequential. The recommended approach: send the 30-day notice by certified mail (creating a documented record), describe the planned fence accurately, and proceed only after the notice period expires without objection or after reaching an explicit written agreement with the neighbor.

The Good Neighbor Fence Law also addresses the situation where neighbors disagree about a fence project. If the adjacent owner objects to the proposed fence construction within the 30-day notice period, the objecting neighbor must state the reasons for the objection in writing. Disputes that cannot be resolved through negotiation are civil law matters — DBI and SF Code Enforcement do not mediate Good Neighbor Fence Law disputes. San Francisco has a Community Boards mediation program (sfcommunitybords.org) that provides low-cost mediation for neighbor disputes, including fence disagreements, and is a more practical resolution pathway than civil litigation for most residential fence controversies.

What the inspector checks on San Francisco fence permits

When a San Francisco fence does require a DBI building permit (over 7 feet in height), a DBI inspection occurs after installation. The inspector verifies that the fence height matches the permitted drawings, the fence is located within the property line (not encroaching on the public right-of-way), the post embedment is adequate for structural stability (San Francisco's winds, while not as extreme as coastal Atlantic markets, are significant year-round), and the construction matches the permit specifications. For permit-free fences under 6 feet, no DBI inspection occurs — but SF Planning Code enforcement and Civil Code §841 compliance remain the homeowner's responsibility.

What a fence costs in San Francisco

San Francisco fence costs are substantially higher than comparable projects in midwestern or southeastern markets, driven by union labor rates, material delivery costs to an urban peninsula, and the generally high cost of San Francisco residential construction. A standard 6-foot cedar or redwood privacy fence (redwood is a premium choice favored in the Bay Area for its natural rot resistance and local sourcing) runs $45–$80 per linear foot installed in San Francisco — approximately double the equivalent cost in Indianapolis. Ornamental iron fencing runs $70–$150+ per linear foot. A typical 80-linear-foot rear yard fence in San Francisco runs $3,600–$6,400 for chain-link or $6,000–$10,000+ for quality wood or redwood.

What happens if you install a non-compliant fence in San Francisco

SF Planning Code Enforcement investigates fence complaints and can issue notices of violation requiring modification or removal of non-compliant fences. A fence that exceeds Planning Code height limits — even if no DBI permit was required for the height — is a zoning violation subject to Code Enforcement. SF's dense residential fabric means that a fence blocking light or views to an adjacent property is the most common trigger for neighbor complaints. Historic district fences installed without required HPC review may be ordered removed regardless of the homeowner's investment in the fence materials. The Good Neighbor Fence Law disputes are civil matters addressed through civil courts or mediation rather than DBI enforcement.

San Francisco Department of Building Inspection (DBI) 49 South Van Ness Avenue, San Francisco, CA 94103
Phone: (628) 652-3700 | permits.sfgov.org

SF Planning Department (Planning Code questions)
49 South Van Ness Avenue | Phone: (628) 652-7600 | sfplanning.org
Planning Information Center: (628) 652-7600

SF Community Boards (fence dispute mediation)
sfcommunityboards.org | 1-800-405-9505
Ready to confirm whether your San Francisco fence needs a permit?
Get a report for your address — DBI permit threshold, Planning Code height limits, Good Neighbor Fence Law notice requirements, and historic district review guidance.
Get Your SF Permit Report →
$9.99 · Based on official city sources · Delivered in minutes

Common questions about San Francisco fence permits

What height fence can I build in San Francisco without a DBI building permit?

Fences 6 feet or under in height do not require a DBI building permit. Fences over 7 feet require a DBI building permit. The 6–7 foot range is a gray zone — confirm with DBI at (628) 652-3700 for your specific project. But even without a DBI building permit, all fences must comply with the SF Planning Code's height limits by yard location: typically 4 feet maximum in front yards and 6 feet in rear and side yards. A permit-exempt 6-foot fence that nonetheless violates Planning Code can be subject to Code Enforcement.

What is California's Good Neighbor Fence Law and how does it apply in San Francisco?

California Civil Code §841 (Good Neighbor Fence Law) requires that before replacing or constructing a shared boundary fence, a property owner must provide the adjacent neighbor with 30 days' written notice of the proposed work, estimated cost, and start date. The neighbor shares cost proportionally unless they object in writing within 30 days. The law applies to all California residential properties, including all San Francisco homes. DBI doesn't administer Civil Code §841 — it's a civil law matter. Disputes are resolved through civil courts or mediation. SF Community Boards (sfcommunityboards.org) provides low-cost fence dispute mediation.

Does SF Planning Code restrict fence heights even without a DBI permit?

Yes. The SF Planning Code governs fence heights by yard location regardless of whether a DBI building permit is required. In most residential zoning districts, front yard fences are limited to 4 feet, and rear and side yard fences to 6 feet. Some neighborhoods have specific area plans or design guidelines with different limits. Fences exceeding these limits require either a Planning Code variance or conditional use authorization — a formal Planning Department process that adds months to the timeline. Check your property's Planning Code limits at sfplanning.org or by calling Planning's information line at (628) 652-7600.

Does my San Francisco fence require Historic Preservation Commission review?

If your property is a contributing structure in a locally designated SF historic district (Alamo Square, Liberty Hill, Liberty Street Historic District, Inner Mission, and others) or a Category A or B landmark, fences that affect the historic character of the property may require a Certificate of Appropriateness from the SF Historic Preservation Commission. Contact SF Planning's Preservation team at (628) 652-7600 before installing or replacing a fence on any potentially historic property. Historic SF Victorians and Edwardians throughout the city may have landmark or historic district designations that trigger this review — check sfplanning.org's property search to confirm your address's historic status.

Is there a frost line requirement for San Francisco fence posts?

No. San Francisco's mild maritime climate means the ground never freezes, and there is no frost line depth requirement for fence posts. Fence post embedment in San Francisco is designed for structural stability under wind loads (San Francisco's Bay winds can be significant year-round) rather than frost heave prevention. Typical wood fence posts in SF are embedded 1/3 of the total post length in concrete — a 9-foot post (6 feet above grade + 3 feet below) is a common specification. The absence of frost depth requirements significantly simplifies post installation compared to Indianapolis or Columbus, where 30–36 inches of frost-depth embedment is required.

How much does a fence cost in San Francisco compared to other cities?

San Francisco fence costs are among the highest nationally, driven by union labor rates and the high cost of construction in the Bay Area. A standard 6-foot cedar or redwood fence (redwood is a premium regional choice) runs $45–$80 per linear foot installed in San Francisco — approximately double the equivalent cost in Indianapolis ($20–$38 per linear foot) or Columbus. Ornamental iron runs $70–$150+ per linear foot in SF. A typical 80-linear-foot rear yard fence runs $6,000–$10,000+ for quality wood in San Francisco, compared to $2,400–$4,400 for the same fence in Indianapolis. DBI permit fees when required (over 7 feet) are typically $250–$500 for residential fences.

Disclaimer: This guide is based on publicly available information from San Francisco DBI and SF Planning Department as of April 2026. SF fence regulations can change and vary significantly by neighborhood and zoning district. Always verify current requirements with DBI at (628) 652-3700 and SF Planning at (628) 652-7600 before beginning any fence project. This is not legal advice.