Skip to content
SetbackIQ

Backyard project permits in San Francisco, CA

San Francisco allows one small exempt shed per lot, and its own city pages disagree on the size limit, so SetbackIQ applies the stricter one.

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 in San Francisco

The examples below assume a typical lot. Your zoning district, lot lines and map overlays can change the answer.

Aerial close-up of one Bethesda lot with its setback zones shaded and about 1,760 square feet of buildable area for a shed highlighted60 ft from front lineSide and rear 5 ftBuildable area~1,760 sq ft
Example: where a shed can go on a real R-60 lot in Bethesda, Maryland. Your lot gets its own rules.

Local project examples

Typical projectPermit?
Shed10-by-12-foot shed, 10 ft tall, no powerNo: no permit for this example
Deck160 sq ft freestanding deck, 24 in highNo: no permit for this example
Fence6-foot wood fence in the backyardYes: Building permitMedium confidence
Garage24-by-20-foot detached garage with lightsYes: Building permit, Planning review of the building permit, Electrical permit
ADU650 sq ft detached backyard cottageYes: Building permit, Planning review (State or Local ADU program), Electrical permit, Plumbing permit
Pool or hot tub16-by-28-foot in-ground pool with a pumpYes: Swimming pool permit, Electrical permit (pump, heater, lights)Medium confidence
Retaining wall3-foot garden retaining wall with nothing above itNo: no permit for this example
Patio or walkway300 sq ft paver patio on gradeNo: no permit for this example
Pergola, play set, or carport10-by-12-foot freestanding pergolaYes: Building permitMedium confidence
Solar panelsRooftop solar arrayYes: Electrical permit
AC, heat pump, or generatorLike-for-like heat pump replacementYes: Mechanical permitMedium confidence
EV chargerLevel 2 charger on a new circuitYes: Electrical permit

Setbacks, heights and zoning

What we cover in San Francisco

  • Projects: All 12 project types verified. Shed · locally verifiedDeck · locally verifiedFence · locally verifiedGarage · locally verifiedADU · locally verifiedPool or hot tub · locally verifiedRetaining wall · locally verifiedPatio or walkway · locally verifiedPergola, play set, or carport · locally verifiedSolar panels · locally verifiedAC, heat pump, or generator · locally verifiedEV charger · locally verified
  • Zoning: We read your zoning district from the official zoning map, so setbacks match your district.
  • Map overlays checked automatically: FEMA flood zones, and National Wetlands Inventory wetlands.
  • Last checked: October 22, 2026. Rule basis: 2025 San Francisco Building Code 106A.2 (as amended by Ord. 146-25) and Planning Code (Secs. 132, 134, 136, 207.1, 207.2); State ADU Law.

Permit office

Common questions

Does a shed need a permit in San Francisco, CA?
Not for the typical example. For a 10-by-12-foot shed, 10 ft tall, no power: One detached one-story storage shed per lot, up to 120 sq ft of floor and 10 ft tall, on the ground, needs no building permit in San Francisco. Size, height, location and wiring can change the answer, so check your exact address.
Does a deck need a permit in San Francisco, CA?
Not for the typical example. For a 160 sq ft freestanding deck, 24 in high: A platform 30 in or less above the ground, not part of an exit and not over a basement or story below, needs no building permit in San Francisco. Size, height, location and wiring can change the answer, so check your exact address.
Does a fence need a permit in San Francisco, CA?
Yes. For a 6-foot wood fence in the backyard: 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. Approvals: Building permit. Size, height, location and wiring can change the answer, so check your exact address.
Does a detached garage need a permit in San Francisco, CA?
Yes. For a 24-by-20-foot detached garage with lights: San Francisco exempts only one small storage shed per lot, so every garage needs a building permit. Approvals: Building permit, Planning review of the building permit, Electrical permit. Size, height, location and wiring can change the answer, so check your exact address.
Does a ADU need a permit in San Francisco, CA?
Yes. For a 650 sq ft detached backyard cottage: Every ADU needs a DBI building permit with plans. Approvals: Building permit, Planning review (State or Local ADU program), Electrical permit, Plumbing permit. Size, height, location and wiring can change the answer, so check your exact address.
Does a pool or hot tub need a permit in San Francisco, CA?
Yes. For a 16-by-28-foot in-ground pool with a pump: San Francisco exempts only prefabricated pools with walls entirely above ground that hold 5,000 gallons or less. SetbackIQ treats hot tubs as needing a permit, the stricter reading. Approvals: Swimming pool permit, Electrical permit (pump, heater, lights). Size, height, location and wiring can change the answer, so check your exact address.
Which addresses does SetbackIQ cover in San Francisco?
Addresses inside the city limits of San Francisco. All 12 project types verified. We confirm the jurisdiction from the parcel when you enter an address.

Sources

  1. 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…
  2. 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…
  3. sf.gov, Check if your construction project needs a permit (other items). Checked 2026-10-22
    Retaining walls that are not over 4 feet (1219 mm) in height measured from the bottom of the footing to the top of the wall, unless supporting a surcharge or impounding Class I, II or III-A liquids... Platforms, sidewalks, walks and driveways when not part …
  4. 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…
  5. 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.
  6. 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 …
  7. 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.
  8. 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…
  9. 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…
  10. 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…
  11. 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…
  12. 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…