Permit guide
Do I need a permit for a fence in San Francisco?
Updated October 2026
Often not. San Francisco Building Code Section 106A.2 exempts fences up to 6 feet tall on the side and rear lot lines at the back of the property, and any fence up to 3 feet. A taller fence, or a front or side fence over 3 feet toward the street, needs a building permit. Either way, the fence must meet the Planning Code's height limits.
Which fences are exempt from a building permit?
- Back-yard fences up to 6 feet on the side and rear lot lines at the rear of the property.
- Any fence up to 3 feet, wherever it is on the lot.
San Francisco Planning's fence handout says the same thing in plain terms: no building permit for a fence of three feet or less at the front, or six feet or less at the side and rear property lines.
When do I need a permit?
- A back-yard fence taller than 6 feet. Planning allows up to 10 feet in a required rear yard, but a permit is needed above 6.
- A fence over 3 feet in the front setback, such as a 6-foot fence that is at least 75% open.
- A retaining wall over 4 feet, measured from the bottom of the footing to the top of the wall, or any retaining wall holding a surcharge such as a slope or driveway above it.
- A pool or spa barrier, which is handled with the pool's permit.
What does Planning review?
When a permit is needed, Planning checks the fence against the Planning Code. Per its fence handout, fences up to 10 feet do not require neighborhood notification and are usually approved over the counter if they meet the limits. The plans need to show the fence's location, the required setbacks and its height, and front-setback fences over 3 feet must show how they meet the openness rule.
What does the answer depend on?
It depends on where the fence sits on your lot, how tall it is and what it stands on. A 6-foot fence on your rear line usually needs nothing. The same fence along the side of your front yard usually does. Put it on top of a retaining wall on a steep lot, and the wall's height can bring in a permit and sometimes the Zoning Administrator, who can allow up to 6 feet of fence above a retaining wall case by case.
What if I want more than the limits allow?
A fence above the limits in a required yard or setback needs a variance from Planning. That is a longer process with no guaranteed outcome. Legislated setbacks cannot be varied at all; they would need a change to the law.
Do nearby cities follow the same rules?
No. Daly City, South San Francisco, San Bruno and Pacifica each have their own codes. In Pacifica, coastal zone review can also apply.
So what is the short version?
Probably no permit if…
- it is 6 feet or less on your rear or rear-side lines,
- or 3 feet or less anywhere,
- and it is not on a tall retaining wall or around a pool.
Plan on a permit if…
- it is over 6 feet in back,
- over 3 feet toward the street,
- on a retaining wall over 4 feet, or part of a pool barrier.
Exempt or not, the fence should sit on your side of the line or be agreed with your neighbor. We review your lot's rules during the estimate.
Sources
San Francisco Building Code Section 106A.2, items 2 and 5 (American Legal Publishing); San Francisco Planning, "Fences" general information handout, dated January 2019, as posted on sfplanning.org in October 2026 (sfplanning.org). This page is a general overview and not legal advice. Confirm with San Francisco Planning and the Department of Building Inspection for your parcel.