Skip to content
SetbackIQ

Do you need a permit for a fence in San Francisco, CA?

It depends on the details of your project.

Side and rear fences behind the house need no permit under 6 ft.

Front fences need no permit up to 3 ft; in the front setback only decorative railings at least 75% open can reach 6 ft, with a permit.

Fences in the required rear yard can be up to 10 ft tall.

A person last checked these rules on October 22, 2026. This is guidance only, so confirm with San Francisco before you build.

Check your exact lot

Your zoning district sets the setbacks, and a flood zone can change the permit answer. Enter your address to see both.

What are you building?

The answer is free. If you need to file, the $19 permit packet adds a site plan with your fence drawn on your lot, an application worksheet and a permit-desk checklist. See a sample packet

Permits a fence can need in San Francisco

PermitWhen it applies
Building permitSan Francisco exempts fences under 6 ft along the rear and side lot lines behind the house, and other fences up to 3 ft. The code says 'not over 6 feet' but sf.gov says 'less than 6 feet', so SetbackIQ treats a 6 ft fence as needing a permit.Medium confidence
Floodplain development permitIf the lot is in a FEMA special flood hazard area, all development there needs a permit.

Limits that apply citywide

Required front setback3 ft; up to 6 ft only for decorative railings or grillework at least 75% open (not wire mesh)Medium confidence
Required rear yard and side yardsUp to 10 ftMedium confidence
Buildable areaOver 10 ft allowed, with neighborhood notification in residential districtsMedium confidence

Draw your fence on your San Francisco lot

PlanIQ finds your parcel, lets you place the fence on it, and checks the placement against the San Francisco limits above (required front setback 3 ft; required rear yard and side yards 10 ft). Draw my lot

Local details

  • Call 811 at least a few days before you dig footings or post holes. Utility locating is free.
  • HOA covenants and deed restrictions can be stricter than city rules. Check yours before you build.

How to apply

Common questions

When does a fence need a building permit in San Francisco?
San Francisco exempts fences under 6 ft along the rear and side lot lines behind the house, and other fences up to 3 ft. The code says 'not over 6 feet' but sf.gov says 'less than 6 feet', so SetbackIQ treats a 6 ft fence as needing a permit. Fences under 6 ft along the side and rear lot lines behind the house, and fences up to 3 ft anywhere, don't need a building permit.
Where do I apply for a fence permit in San Francisco?
Apply through Check if your project needs a permit (sf.gov), or call (628) 652-3200.

Sources

  1. sf.gov, Check if your construction project needs a permit. Checked 2026-10-23
    One-story detached accessory buildings or structures used as tool and storage sheds, playhouses and similar uses, if the projected roof area is less than 100 square feet (9.29 m2) and no taller than 8 feet... Fences less than 6 feet (1829 mm) high located a…
  2. San Francisco Building Code (2019 edition, archived on American Legal), Section 106A.2 Work exempt from permit. Checked 2026-10-22
    Fences not over 6 feet (1829 mm) high located at the rear and side lot lines at the rear of the property, and all fences not over 3 feet... One-story detached accessory buildings or structures used as tool and storage sheds, playhouses and similar uses, pro…
  3. SF Planning, General Information - Fences (January 2019). Checked 2026-10-22
    A building permit is not required for a fence that is three feet or less in height at the front [and] six feet or less in height at the side or rear property lines... If you propose a fence within the required front setback area, it is limited to a height o…
  4. 44 CFR 59.1, definition of development (NFIP). Checked 2026-10-19
    Development means any man-made change to improved or unimproved real estate, including but not limited to buildings or other structures...
  5. 44 CFR 60.3, floodplain management criteria. Checked 2026-10-19
    Require permits for all proposed construction or other development in the community...
  6. San Francisco Planning Code § 136(c) (GoCodebook copy, current through Ord. 10-26, effective 3/16/2026). Checked 2026-10-22
    (16) Decorative railings and decorative grille work, other than wire mesh, at least 75 percent open to perpendicular view [and] no more than six feet in height above grade... (13) Retaining walls that are necessary to maintain approximately the grade existi…