Setback requirements in San Francisco, CA
We have not verified San Francisco's accessory-structure setback tables yet.
A person last checked these rules on October 22, 2026. This is guidance only, so confirm with San Francisco before you build.
Find your district

Citywide placement rules
| Shed: In the required rear yard | Detached structures up to 10 ft tall covering no more than 120 sq ft combined (plus 1 ft of eave); no sleeping quarters or full kitchen |
|---|---|
| Shed: Required rear yard (RH, RM-1, RM-2, RTO and RTO-M districts) | 30% of lot depth, at least 15 ft |
| Garage: In the required rear yard | Detached structures up to 10 ft tall covering no more than 120 sq ft combined (plus 1 ft of eave); no sleeping quarters or full kitchenMedium confidence |
| Garage: Required rear yard (RH districts) | 30% of lot depth, at least 15 ftMedium confidence |
| Garage: Front setback | No parking or vehicle storage; at least 20% unpaved and planted, at least 50% permeableMedium confidence |
| Deck: In the required rear yard | Decks at or below the first floor; floor no more than 3 ft above grade where the lot slopes 15% or less, and under a 45-degree plane from 3 ft at the lot lines (up to 7 ft on lots sloping more than 15%)Medium confidence |
| Deck: Required rear yard (RH districts) | 30% of lot depth, at least 15 ftMedium confidence |
| ADU: Side setback (detached) | 4 ft (none for a conversion of an existing structure) |
| ADU: Rear setback (detached) | 4 ft (none for a conversion of an existing structure) |
| Fence: Required front setback | 3 ft; up to 6 ft only for decorative railings or grillework at least 75% open (not wire mesh)Medium confidence |
| Fence: Required rear yard and side yards | Up to 10 ftMedium confidence |
Sources
- San Francisco Ordinance No. 146-25 (File No. 250284), Planning and Building Codes - Noncomplying, Unpermitted, and Accessory Structures. Checked 2026-10-23
One-story detached accessory buildings or structures used as tool and storage sheds, playhouses, [and similar uses, provided the floor area does not exceed 120 square feet; finally passed July 29, 2025, effective September 5, 2025 per the Planning Code hist…
- SF DBI Technical Services, Frequently Asked Questions, Storage Sheds Exempt from a Building Permit. Checked 2026-11-02
provided the floor area does not exceed 120 square feet... not more than 10 feet high per San Francisco Planning Code Section 136(c)23... [A shed over 120 sq ft or 10 ft] requires a building permit with plans and the approval of the San Francisco Planning D…
- 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…
- sf.gov, Apply for an electrical permit. Checked 2026-10-22
You need an electrical permit before installing new wiring or alterations, extensions, or additions [to existing electrical installations]... Only owner-installers of stand-alone single family dwellings may apply for an electrical permit to do the work them…
- sf.gov, Apply for a plumbing and mechanical permit. Checked 2026-10-22
[You need a permit before] cutting into or replacing pipes that transport water, gas, hot air, or cool air... Contractors must hold a C4, C16, C20, C36, C54, B, or A license to apply for a plumbing or mechanical permit in general.
- 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...
- 44 CFR 60.3, floodplain management criteria. Checked 2026-10-19
Require permits for all proposed construction or other development in the community...
- San Francisco Planning Code § 136(c)(22)-(23), permitted obstructions in required yards (American Legal, current through Ord. 10-26, eff. 3/16/2026). Checked 2026-10-23
[Permitted in required Yards] (22) Garden structures enclosed by walls on no more than 50 percent of their perimeter, such as gazebos and sunshades, if no more than eight feet in height above grade and covering no more than 60 square feet of land; (23) One …
- San Francisco Planning Code § 134(c)(1), rear yards (American Legal, as amended by Ord. 245-25, eff. 1/12/2026). Checked 2026-10-23
(1) In RH, RM-1, RM-2, RTO-1, and RTO-M Zoning Districts, the basic rear yard shall be equal to 30% of the total depth of the lot on which the building is situated, but in no case less than 15 feet.
- 2024 IRC R105.2, Work exempt from permit (text published by the City of Benson, AZ). Checked 2026-10-19
One-story detached accessory structures, provided that the floor area does not exceed 200 square feet. Fences not over 7 feet high. Decks not exceeding 200 square feet in area, that are not more than 30 inches above grade at any point, are not attached to a…
- 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…
- San Francisco Planning Code § 132, front setback areas (GoCodebook copy, current through Ord. 10-26). Checked 2026-10-22
No motor vehicle, trailer, boat or other vehicle shall be parked or stored within any such area... in every case not less than 20% of the required setback area shall be and remain unpaved and devoted to plant material... The front setback area shall be at l…
- sf.gov, Get a building permit for an accessory dwelling unit (ADU). Checked 2026-10-22
Next you will need to decide whether to apply using the State or Local ADU program... ADUs using the Local program require in-house review by the Planning Department... A building permit is required to do construction in San Francisco... A separate mechanic…
- SF Planning, Accessory Dwelling Units. Checked 2026-10-22
Two ADU Programs are available for single-family buildings: Local and State... No, State and Local ADU programs cannot be combined... 4 or less legal dwelling units on the lot: 1 ADU + 1 Detached ADU allowed... ADUs in the Local Program will be subject to t…
- SF Planning Director Bulletin No. 3, State Accessory Dwelling Unit Program (updated June 2026). Checked 2026-11-02
1 Detached ADU is allowed on a lot with an existing or proposed single-family building... Studio and 1-bedroom ADUs are allowed up to 850 square feet. 2+ bedroom ADUs are allowed up to 1,000 square feet. Maximum height. Up to 18 feet. An additional 2 feet i…
- San Francisco Planning Code §§ 207.1 (Local ADU Program, through Ord. 170-25) and 207.2 (State-Mandated ADU Program, through Ord. 222-25, effective 12/22/2025) (GoCodebook copy). Checked 2026-10-22
[207.1(c)(15): one detached ADU may be placed in the required rear yard, at least four feet from the side and rear lot lines, no taller than 16 feet, 850 sq ft (one bedroom or less) or 1,000 sq ft] ... [207.2(d)(9)(A)] A height of 18 feet for a detached ADU…
- HCD Accessory Dwelling Unit Handbook (March 2026). Checked 2026-10-19
A setback of no more than four feet from the side and rear lot lines shall be required for an attached or detached ADU (Gov. Code, 66314(d)(7)).
- 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…
- 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…