Skip to content

Santa Clara County · Building on your lot

Sheds, garages and other accessory structures in Santa Clara County

In urban residential districts, detached accessory buildings are limited to 12 feet and 1 story, or 16 feet with a hip or gable roof.

Key points

  • Accessory height: In urban residential districts, detached accessory buildings are limited to 12 feet and 1 story, or 16 feet with a hip or gable roof.

Each rule below links to the section of the Santa Clara County Municipal Code it was read from, with the code text one click away (checked October 2026). General information, not legal advice.

What Santa Clara County's code says

Santa Clara County code What Santa Clara County's code adds
Maximum height
  • No more than 12 feet and 1 story.
    Applies: Detached accessory buildings in R1, R1E, RHS, R1S, R3S, R2 and A1 districts within urban service areas.
    § 4.20.020 · code text
    Height shall not exceed 12 feet and is limited to no more than one story.
  • Ridge height no more than 16 feet.
    Applies: Hip or gable roof detached accessory buildings in urban residential districts; not buildings with dormers or gambrel roofs.
    § 4.20.020 · code text
    In no case may the ridge height exceed 16 feet.
  • 12 feet
    Applies: Rural districts on lots with gross lot area less than two and one-half acres; no more than one story
    § 4.20.020 · code text
    If gross lot area is less than two and one-half acres, maximum height allowed is 12 feet, and one story.
  • 16 feet
    Applies: Hip or gable roof accessory buildings in rural districts on lots with gross lot area less than two and one-half acres; absolute height maximum; not for buildings with dormers or gambrel roofs
    § 4.20.020 · code text
    In no case may the absolute height exceed 16 feet.
  • 35 feet
    Applies: Rural districts on lots with gross lot area of two and one-half acres or greater
    § 4.20.020 · code text
    If the gross lot area is two and one-half acres or greater, maximum absolute height allowed is 35 feet.
Size or lot coverage
  • No more than 30% of the rear yard in total.
    Applies: Detached accessory buildings in urban residential districts.
    § 4.20.020 · code text
    Rear yard coverage of detached accessory buildings shall not cumulatively exceed 30 percent.
  • No more than 30% of the rear yard in total.
    Applies: Residential accessory buildings in rural districts; greenhouses and other agricultural buildings are excluded.
    § 4.20.020 · code text
    Rear yard coverage of residential accessory buildings shall not cumulatively exceed 30 percent.
  • No more than 600 square feet.
    Applies: Garages, carports or other parking structures in the required front or side yard on qualifying sloping lots, with a special permit.
    § 4.20.020 · code text
    Such parking structures may not be larger than 600 square feet.
Side and rear setback
  • 30 feet
    Applies: Accessory buildings or structures exceeding 12 feet in height on lots two and one-half acres or larger in rural districts
    § 4.20.020 · code text
    Accessory buildings or structures exceeding 12 feet in height (16 total feet with gable/hip roof allowance, as provided in subsection 4.20.020.E.1.a., above) on lots two and one-half acres or larger are subject to side and rear yard setbacks of no less than 30 feet.
Distance from the house
  • At least 6 feet from any dwelling.
    Applies: Detached accessory buildings in urban residential districts; trellises and other unenclosed structures may be closer.
    § 4.20.020 · code text
    Separation from any dwelling shall not be less than six feet between exterior walls, and may be further restricted by the provisions of the zoning ordinance or County Ordinance Code.
  • At least 6 feet from any dwelling.
    Applies: Accessory buildings and structures in rural districts; trellises and other unenclosed structures may be closer.
    § 4.20.020 · code text
    Separation from any dwelling shall not be less than six feet (defined in Chapter 1.30), and may be further restricted by the provisions of this ordinance.

Who this affects

HomeownersContractorsDesigners

Frequently asked questions

How big can a shed or accessory building be in Santa Clara County?

In urban residential districts, detached accessory buildings are limited to 12 feet and 1 story, or 16 feet with a hip or gable roof.

General information, not legal advice.

Ask about a specific Santa Clara County property

Ask GoCodebook how Santa Clara County's sheds, garages and other accessory structures rules apply to your situation and get an answer that cites the section.

Ask your question

More on building on your lot in Santa Clara County