Skip to content

Santa Clara County · Building on your lot

Building on your lot in Santa Clara County

Santa Clara County's code applies only in unincorporated areas of the county. Limits differ between urban residential districts and rural districts, and between small and large lots.

Key points

  • Fence height: Urban residential fences are limited to 3 feet within 20 feet of the front lot line and 8 feet elsewhere on the lot.
  • 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.
  • Home businesses: A general home business is done in the home by residents, with at most 1 nonresident employee (county rule).

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

Santa Clara County's code applies in the unincorporated areas of the county. Cities in Santa Clara County have their own codes and their own pages.

Fences and walls

Santa Clara County code What Santa Clara County's code adds
Corner visibility
  • No higher than 3 feet in the 40-foot street-corner sight triangle, or 20-foot triangle by a key lot.
    Applies: Corner lots in urban residential districts.
    § 4.20.050 · code text
    On corner lots, fences or hedges along the exterior side lot line (or edge of side right-of-way) may be as tall as eight feet, except that a three-foot height limitation shall apply within the following areas: (a) within the 40-foot sight clearance triangle defined by Section B17-69 of the County Ordinance Code, which relates to vehicular sight clearance on intersecting streets, and (b) within a 20-foot sight clearance triangle where the rear of a corner lot abuts the front and side yards of a key lot.
  • No higher than 3 feet within a triangle with two 20-foot sides.
    Applies: Fences near driveways in rural districts; design review approval may allow more height.
    § 4.20.050 · code text
    Within a triangle formed by two 20-foot sides measured from the point of intersection along the edge of pavement and the edge of driveway, no fence may exceed three feet in height, unless design review approval is obtained under Chapter 5.50.
Height anywhere on the lot
  • Fences up to 8 feet.
    Applies: Urban residential districts, more than 20 feet from the front lot line; corner-lot limits apply; does not apply to hedges.
    § 4.20.050 · code text
    Fences shall not exceed eight feet in height within any other portion of a lot, except as specified in Subsection 3 below.
  • Fences up to 8 feet.
    Applies: Rural districts, outside the street and driveway areas; does not apply to hedges.
    § 4.20.050 · code text
    Fences not exceeding eight feet in height may occupy any portion of a lot other than the restricted areas described in subparagraphs (1) and (2), above.
Front yard height
  • Fences or hedges no higher than 3 feet.
    Applies: Urban residential districts, within 20 feet of the front lot line or edge of front right-of-way.
    § 4.20.050 · code text
    Fences or hedges shall not exceed three feet in height within any portion of a lot within 20 feet of the front lot line (or edge of front right-of-way).
  • Fences or hedges up to 6 feet.
    Applies: Rural districts, within 20 feet of the edge of any street right-of-way.
    § 4.20.050 · code text
    Fences or hedges not exceeding six feet in height may occupy any portion of a lot within 20 feet of the edge of any street right-of-way.

Sheds, garages and other accessory structures

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.

Running a business from home

Santa Clara County code What Santa Clara County's code adds
Space used
  • No more than 1,200 square feet in total.
    Applies: Expanded home occupations in accessory buildings, on lots of at least 1 acre gross.
    § 4.10.180 · code text
    Accessory buildings containing expanded home occupation uses shall be limited in area to not more than 1,200 square feet (total).
Customer visits
  • Normally no more than 3 client visits per day and 10 per week.
    Applies: General and expanded home occupations.
    § 4.10.180 · code text
    Client or customer visits to the site shall normally be limited to not more than three (3) per day, and 10 per week;
Employees
  • 1 nonresident employee.
    Applies: General home occupations; the work is done in the home by the people who live there.
    § 4.10.180 · code text
    The use shall be conducted within the dwelling by resident occupants, and may include one (1) nonresident employee;
  • 1 nonresident employee, up to full-time.
    Applies: Expanded home occupations, on lots of at least 1 acre gross.
    § 4.10.180 · code text
    The use shall be conducted within the dwelling or accessory building by resident inhabitants, and may include one (1) nonresident (up to full-time) employee;
Permit
  • Optional: a written zoning administrator decision, with a questionnaire and filing fee.
    Applies: For a person who wants an official decision on whether a use is a general home occupation.
    § 4.10.180 · code text
    Such interpretation shall require completing a home occupation questionnaire, and submitting such questionnaire to the planning office along with a filing fee as required by the Board of Supervisors;
Businesses not allowed
  • on-site automotive repair or service; commercial food preparation other than a cottage food operation; medical or veterinary services; massage; painting of vehicles, trailers, boats or machinery; pest control; any use which violates any applicable law
    Applies: General and expanded home occupations
    § 4.10.180 · code text
    Uses which include the following shall not be allowed as home occupations:

Solar panels and EV chargers

Santa Clara County code What Santa Clara County's code adds
EV charger permit
  • A permit is issued once the charger meets the county checklist and safety rules; no power until final inspection approval.
    Applies: Applies to EV charging stations.
    § C3-53 · code text
    Upon confirmation by the Building Official that the proposed Electric Vehicle Charging Station meets the requirements of the County's adopted checklist, is consistent with all applicable laws and health and safety standards, and could not have a Specific, Adverse Impact on public health or safety, the Building Official shall approve the application and issue all necessary permits.
Solar permit process
  • Electronic filing allowed; permit and inspection fees apply; complete applications get administrative, nondiscretionary review and approval.
    Applies: Applies to small home rooftop solar systems.
    § C3-47 · code text
    The applicant may submit the application and related documentation for a small residential rooftop solar energy system by electronic submittal, with all required permit processing and inspection fees, as adopted by resolution of the Board of Supervisors.

Tree removal

Santa Clara County code Yes; an administrative permit from the County Planning Office is needed before removing a protected tree. Yes; an encroachment permit from the Department of Roads and Airports, at least 60 days before removal.

All 11 Santa Clara County rules on tree removal, with the code text and the state law underneath →

Swimming pools

Santa Clara County code What Santa Clara County's code adds
Pool barrier
  • No opening, hole or gap may be more than 4 inches wide or high.
    Applies: Doors and gates are excepted.
    § B18-2 · code text
    except for doors or gates, either the horizontal or vertical dimension of any opening, hole or gap in said enclosure shall not exceed four inches;
  • A house or accessory building may form part of the enclosure.
    § B18-2 · code text
    a dwelling house or accessory building may be used as a part of said enclosure.
  • An automatic pool cover that holds 150 pounds at any point may replace a fence.
    Applies: Only on parcels larger than 2.5 acres gross.
    § B18-2 · code text
    An automatic pool cover capable of supporting a concentrated load of 150 pounds at any point is an acceptable alternative to a fence if the parcel size is larger than 2.5 acres gross.
Barrier height
  • At least 5 feet.
    Applies: The enclosure around a private pool.
    § B18-2 · code text
    A private swimming pool as defined herein shall be completely enclosed by a fence, wall or other structure not less than five feet in height;
Gates
  • Self-closing and self-latching; latch at least 4 feet 9 inches above ground, or otherwise out of children's reach.
    Applies: Gates or doors in the required enclosure.
    § B18-3 · code text
    Any gate or door that is a part of the enclosure required by Section B18-2 shall be equipped with a self-closing and self-latching device designed to keep such gate or door securely closed at all times, with the latching device either placed at least four feet, nine inches above ground level or otherwise made inaccessible from the outside to children.
Maintenance and empty pools
  • The owner or occupant must maintain the enclosure or cover.
    § B18-2 · code text
    Every person who owns or occupies a premises on which a private swimming pool is situated shall be responsible for maintaining said enclosure or cover.
Permit
  • Final inspection and approval of a private pool are held until enclosure and gate rules are met.
    Applies: Private swimming pools.
    § B18-5 · code text
    Final inspection and approval of all private swimming pools shall be withheld until all requirements of Sections B18-2 and B18-3 have been complied with.

Pets, chickens and bees

Santa Clara County code What Santa Clara County's code adds
Permit
  • Written notice to the County Agricultural Commissioner within 5 days of the move's start.
    Applies: Moving an apiary into or within the County.
    § B29-11 · code text
    No apiary shall be moved into the County or within the confines of the County without notice in writing being given to the Agricultural Commissioner of the County within five days from the date movement is begun
Pet limit
  • At most 2 dogs over 4 months old.
    Applies: Parcels under 5 acres, unless there is a private kennel, commercial kennel, animal menagerie or animal shelter permit.
    § B31-32 · code text
    the maximum number of dogs shall be two dogs over four months of age
  • At most 3 dogs.
    Applies: Parcels of 5 acres or more, unless there is a private kennel, commercial kennel, animal menagerie or animal shelter permit.
    § B31-32 · code text
    A maximum of three dogs shall be allowed on parcels of five acres or more, unless a permit for a private kennel, commercial kennel, animal menagerie, or animal shelter is obtained by the owner/guardian of the animals.
  • At most 5 cats over 4 months old.
    Applies: Parcels under 5 acres, unless there is a private kennel, commercial kennel, animal menagerie or animal shelter permit.
    § B31-51 · code text
    the maximum number of cats or litters shall be five cats over four months of age

Other Santa Clara County rules on this

Santa Clara County'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 Santa Clara County?

Urban residential fences are limited to 3 feet within 20 feet of the front lot line and 8 feet elsewhere on the lot.

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.

Can I run a business from my home in Santa Clara County?

A general home business is done in the home by residents, with at most 1 nonresident employee (county rule).

Do I need a permit for solar panels or an EV charger in Santa Clara County?

Santa Clara County's code: A permit is issued once the charger meets the county checklist and safety rules; no power until final inspection approval. (Applies to EV charging stations.) (§ C3-53); Electronic filing allowed; permit and inspection fees apply; complete applications get administrative, nondiscretionary review and approval. (Applies to small home rooftop solar systems.) (§ C3-47).

What are the pool fence and setback rules in Santa Clara County?

Santa Clara County's code: No opening, hole or gap may be more than 4 inches wide or high. (Doors and gates are excepted.) (§ B18-2); A house or accessory building may form part of the enclosure. (§ B18-2).

Can I keep chickens or bees at my home in Santa Clara County?

Santa Clara County's code: Written notice to the County Agricultural Commissioner within 5 days of the move's start. (Moving an apiary into or within the County.) (§ B29-11); At most 2 dogs over 4 months old. (Parcels under 5 acres, unless there is a private kennel, commercial kennel, animal menagerie or animal shelter permit.) (§ B31-32).

General information, not legal advice.

Ask about a specific Santa Clara County property

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

Ask your question

More on Santa Clara County