Skip to content

San Francisco · Building on your lot

Building on your lot in San Francisco

San Francisco sets its own limits on fences, structures in required yards and home businesses. Limits depend on whether a fence or structure sits in a front setback, a side or rear yard, or usable open space.

Key points

  • Fence height: Fences: at most 3 feet in required front setbacks, 6 feet in usable open space, 10 feet in required side and rear yards.
  • Yard structures: Detached structures in required side and rear yards: at most 10 feet high and 120 square feet combined, without sleeping quarters or full kitchens.
  • Home businesses: A home business may use at most 1/3 of the home's floor area, with at most 2 non-resident workers, not counting domestic workers.

Each rule below is marked San Francisco code or CA state law and links to the section it comes from (checked October 2026). General information, not legal advice.

Practical research questions and checklists

Fences and walls

San Francisco code What San Francisco's code adds
Front yard height
  • No more than 3 feet above grade.
    Applies: Fences in legislated setback lines and required front setback areas. Decorative railings at least 75% open may reach 6 feet.
    § 136 · code text
    (17) Fences no more than three feet in height above grade;
Side and rear yard height
  • No more than 10 feet above grade.
    Applies: Fences and wind screens in required side and rear yards only. Front setbacks limit fences to 3 feet; usable open space to 6 feet.
    § 136 · code text
    (19) Fences and wind screens no more than 10 feet in height above grade;

Sheds, garages and other accessory structures

San Francisco code What San Francisco's code adds
Maximum height
  • No more than 10 feet above grade, to the top of the structure.
    Applies: Detached structures in required side and rear yards; no sleeping quarters or full kitchens; combined 120 square feet or less.
    § 136 · code text
    One or more detached structures, which may not include sleeping quarters or full kitchens, but may include bathrooms and wetbars, if no more than 10 feet in height above grade, as measured to the top of the structure
Size or lot coverage
  • No more than 120 square feet combined, measured at grade.
    Applies: Detached structures in a required yard, at most 10 feet tall, without sleeping quarters or full kitchens. An extra 1-foot roof eave may be allowed.
    § 136 · code text
    covering no more than a combined 120 square feet as measured at grade
  • No more than 60 square feet of land.
    Applies: Garden structures walled on no more than 50% of the perimeter, no more than 8 feet tall, in required yards and usable open space.
    § 136 · code text
    if no more than eight feet in height above grade and covering no more than 60 square feet of land
Side and rear setback
  • At least 5 feet from any interior side lot line.
    Applies: Decks or building extensions in the required rear yard taller than 10 feet, up to the second floor level. Not detached structures.
    § 136 · code text
    in which case the structure shall be no closer than five feet to any interior side lot line
  • Not within the rear 15 feet of the lot depth.
    Applies: Underground garages, or garages under decks, in required yards, if their tops are usable open space.
    § 136 · code text
    provided that no such garage shall occupy any area within the rear 15 feet of the depth of the lot

Running a business from home

San Francisco code What San Francisco's code adds
Space used
  • No more than 1/3 of the home's total floor area.
    Applies: Except for accessory off-street parking and loading or Neighborhood Agriculture.
    § 204.1 · code text
    The use of more than one-third of the total floor area of the dwelling unit, except in the case of accessory off-street parking and loading or Neighborhood Agriculture as defined by Section 102;
Employees
  • No more than 2 people who do not live in the home may be employed.
    Applies: Domestic workers, gardeners and janitors do not count.
    § 204.1 · code text
    The employment of more than two people who do not reside in the dwelling unit, excluding a domestic worker, gardener, or janitor;
Businesses not allowed
  • Keeping a stock in trade, other than Neighborhood Agriculture garden produce or materials and products of a Cottage Food Operation
    § 204.1 · code text
    The maintenance of a stock in trade other than garden produce related to Neighborhood Agriculture as defined by Section 102, or materials and products related to a Cottage Food Operation; or
  • A business office open to the public
    Applies: Except sales of Neighborhood Agriculture garden produce or finished Cottage Food Operation products; a resident professional may keep an office in the dwelling unit if it is reached only from inside the unit
    § 204.1 · code text
    The conduct of a business office open to the public other than for sales related to garden produce of Neighborhood Agriculture as defined by Section 102, or the finished products of a Cottage Food Operation; or
  • Medical Cannabis Dispensary
    § 204.1 · code text
    A Medical Cannabis Dispensary as defined in Section 102; or
  • Massage Establishment, Sole Practitioner, or Sole Practitioner Massage Establishment
    § 204.1 · code text
    A Massage Establishment as defined in Section 102, or either a Sole Practitioner or Sole Practitioner Massage Establishment as defined in Section 29.5 of the Health Code (a Health Service Use).

Other San Francisco rules on this

San Francisco's code also has these chapters. We have not summarized their values on this page yet; read them in the library.

Who this affects

HomeownersContractorsDesigners

Frequently asked questions

How tall can a fence be in San Francisco?

Fences: at most 3 feet in required front setbacks, 6 feet in usable open space, 10 feet in required side and rear yards.

How big can a shed or accessory building be in San Francisco?

Detached structures in required side and rear yards: at most 10 feet high and 120 square feet combined, without sleeping quarters or full kitchens.

Can I run a business from my home in San Francisco?

A home business may use at most 1/3 of the home's floor area, with at most 2 non-resident workers, not counting domestic workers.

General information, not legal advice.

AI-assisted research · Source checks recorded

San Francisco: Building and ADUs

Before selecting design standards or a permit path. Start with a question, collect the records, and follow the cited law.

City and County of San Francisco. Source checks do not establish a property-specific outcome. Open questions appear in each verification record.

SF-B01 · Research pending

Which San Francisco ADU program should be evaluated for this project?

For Architect · Builder · Inspector. Evidence research and an answer draft are still needed.

SF-B02 · Research pending

What records matter when converting San Francisco basement space into an ADU?

For Architect · Builder · Inspector. Evidence research and an answer draft are still needed.

SF-B03 · Research pending

How do ADU options differ for existing and proposed multifamily buildings?

For Architect · Builder · Inspector. Evidence research and an answer draft are still needed.

SF-B04 · Research pending

What must be verified before proposing a separate sale of a San Francisco ADU?

For Architect · Builder · Inspector. Evidence research and an answer draft are still needed.

SF-B05 · Research pending

What historic resource checks are needed for a San Francisco ADU?

For Architect · Builder · Inspector. Evidence research and an answer draft are still needed.

Ask about a specific San Francisco property

Ask GoCodebook how these rules apply to your address and get an answer that cites the section.

Ask your question

More on San Francisco