Skip to content

San Diego County · Building on your lot

Building on your lot in San Diego County

San Diego County's code applies only in unincorporated areas of the county. There it sets limits on fences, detached accessory buildings, rooftop solar and pool safety features, and fence height depends on the yard and the fence type.

Key points

  • Front fences: Front-yard fences are limited to 42 inches, except open wire, iron or rail fences on lots of 1 acre or more in certain zones.
  • Rear and side: Rear and interior side yard fences and walls, solid or open, are limited to 72 inches.
  • Accessory setbacks: Detached accessory building walls must be at least 3 feet and eaves 2 feet from interior side and rear lot lines.
  • Accessory size: Detached accessory buildings with any part in a required setback are limited to 1,000 square feet combined.
  • New pools: A new pool at a single-family home or duplex needs a permit, a permanent enclosure from neighbors and one more listed safety feature.
  • Rooftop solar: Rooftop solar on single- or two-family homes up to 38.4 kW AC or 30 kW thermal gets streamlined permitting with an online platform.

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

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

Fences and walls

San Diego County code What San Diego County's code adds
Front yard height
  • Up to 42 inches.
    Applies: Solid fences and walls in a front or street-side yard.
    § 6708 · code text
    Front or Exterior Side Yard. Permitted up to a maximum height of 42 inches.
  • Up to 42 inches.
    Applies: Open fences and walls in front or street-side yards; listed open fences on lots of at least 1 gross acre in listed zones: 72 inches.
    § 6708 · code text
    Front or Exterior Side Yard. Permitted up to a maximum height of 42 inches, except as follows:
  • Up to 72 inches in a front or street-side yard.
    Applies: Open wire, wrought iron, pipe corral or rail fences on lots of at least 1 gross acre in A70, A72, RR, S82, S88, S90, S92.
    § 6708 · code text
    On lots of one (1) gross acre or larger in size in the A70, A72, RR, S82, S88, S90 and S92 Use Regulations, open fences consisting of woven or barbed wire, wrought iron, pipe corral, or rails may be 72 inches high.
Side and rear yard height
  • Up to 72 inches.
    Applies: Solid or open fences and walls in rear or interior side yards.
    § 6708 · code text
    Rear or Interior Side Yards. Permitted up to a maximum height of 72 inches.

Also in San Diego County's code: Height of fences (§ 4630). This page does not summarize it yet.

Sheds, garages and other accessory structures

San Diego County code What San Diego County's code adds
Size or lot coverage
  • A detached accessory building over 1,000 square feet cannot be in a required setback.
    Applies: Detached accessory buildings allowed under the zoning accessory use rules.
    § 4842 · code text
    No detached accessory building authorized by Section 6156.g exceeding 1,000 square feet in area shall be located within a required setback pursuant to Section 4810.
  • Their combined area can be at most 1,000 square feet.
    Applies: All detached accessory buildings with any part in a required setback.
    § 4842 · code text
    The combined area of all detached accessory buildings authorized by Section 6156.g, having any portion within the required setback pursuant to Section 4810, shall not exceed 1,000 square feet.
Side and rear setback
  • Walls at least 3 feet from interior side and rear lines.
    Applies: Detached accessory buildings.
    § 4842 · code text
    No detached accessory building shall be located with walls closer than 3 feet or eaves closer than 2 feet from interior side or rear property lines.
  • Eaves at least 2 feet from interior side and rear lines.
    Applies: Detached accessory buildings.
    § 4842 · code text
    No detached accessory building shall be located with walls closer than 3 feet or eaves closer than 2 feet from interior side or rear property lines.
Distance from the house
  • Walls must be at least 6 feet from main building walls and other accessory building walls.
    Applies: Detached accessory buildings on the same lot; if closer, main-building setbacks apply to both; animal enclosures, coops and low pools have exceptions.
    § 4841 · code text
    No detached accessory building walls shall be closer than 6 feet to any main building walls or other accessory building walls on the same lot or building site and no detached accessory building eaves shall be closer than 4 feet to any main building eaves or other accessory building eaves on the same lot or building site.
  • Eaves must be at least 4 feet from main building eaves and other accessory building eaves.
    Applies: Detached accessory buildings on the same lot; if closer, main-building setbacks apply to both; animal enclosures, coops and low pools have exceptions.
    § 4841 · code text
    No detached accessory building walls shall be closer than 6 feet to any main building walls or other accessory building walls on the same lot or building site and no detached accessory building eaves shall be closer than 4 feet to any main building eaves or other accessory building eaves on the same lot or building site.

Solar panels and EV chargers

San Diego County code What San Diego County's code adds
Solar height and setbacks
  • Must meet the zone's height limit; may extend up to 5 feet above the roof's highest point where allowed.
    Applies: Photovoltaic solar systems for onsite use.
    § 6954 · code text
    ii. Height. A System shall meet the height limit of the height designator of the zone, except when allowed to extend not more than 5 feet above the highest point of the roof, in accordance with Section 4620.i.
  • Must meet the zone's main building setbacks, or a listed alternative setback rule.
    Applies: Photovoltaic solar systems for onsite use.
    § 6954 · code text
    A System shall meet all of the main building setback requirements of the zone or comply with Section 4835.f.
Solar permit process
  • streamlined permitting process; online automated permitting platform available
    Applies: Rooftop solar/storage on single- or two-family dwelling; no larger than 38.4 kW AC or 30 kW thermal; checklist and county code compliance
    § 91.1.105.3.1.1 · code text
    Solar energy and energy storage systems that meet the criteria under this section can use the County's online automated permitting platform to obtain the necessary permits.

Swimming pools

San Diego County code A new pool at a single-family home or duplex needs a permit, a permanent enclosure from neighbors and one more listed safety feature.

All 10 San Diego County rules on swimming pools, with the code text and the state law underneath →

Other San Diego County rules on this

San Diego 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 San Diego County?

Front-yard fences are limited to 42 inches, except open wire, iron or rail fences on lots of 1 acre or more in certain zones. Rear and interior side yard fences and walls, solid or open, are limited to 72 inches.

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

Detached accessory building walls must be at least 3 feet and eaves 2 feet from interior side and rear lot lines. Detached accessory buildings with any part in a required setback are limited to 1,000 square feet combined.

Do I need a permit for solar panels or an EV charger in San Diego County?

Rooftop solar on single- or two-family homes up to 38.4 kW AC or 30 kW thermal gets streamlined permitting with an online platform.

General information, not legal advice.

Ask about a specific San Diego County property

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

Ask your question

More on San Diego County