Home · Blog · Shed, fence and deck permits

Sheds, fences, decks, patio covers and retaining walls in San Jose: permit and zoning rules

Backyard projects are where San José homeowners most often guess wrong about permits. A small shed or a low fence can go up with no building permit. A slightly bigger one needs a permit, a planning approval, or both. This guide covers sheds, fences, decks, patio covers and retaining walls on single-family and duplex lots, with the City source linked for every point.

KEY TAKEAWAYS
  • A shed or other accessory building of 120 square feet or less needs no building permit if it will not be electrically wired.1
  • Fences need no permit up to 3 feet in the front yard and 7 feet in side and rear yards. Taller fences need a building permit and a planning permit.3
  • A deck needs a permit if it is 200 square feet or more, 30 inches or more above ground, attached to the house, or serves an exit door or door landing.4
  • A retaining wall over 2 feet needs a building permit. At 4 feet or with a surcharge, it also needs a Public Works grading permit.3
  • The City publishes no patio cover handout. Ask the Building Division, 408-535-3555.10, 11

Permit thresholds at a glance

ProjectNo building permit whenWhat changes the answer
Shed or accessory building120 sq. ft. or less and not electrically wired1Zoning limits apply at any size2
FenceUp to 3 ft in front, 7 ft on sides and rear3Corner lots, PD zones, pool barriers3, 7
DeckUnder 200 sq. ft., under 30 in. above ground, detached, not at an exit door or landing4Any one trigger means a permit4
Retaining wall2 ft or less above existing grade3Surcharge or 4 ft from footing means a grading permit too3
Patio coverNo City handout10Ask the Building Division

San José has enforced the 2025 California codes since January 1, 2026.11 The code sections below are from the 2025 edition. For the full list of what is exempt, see our San José building code guide.

Sheds, gazebos and other accessory buildings

The City exempts accessory buildings or structures of 120 square feet or less that will not be electrically wired.1 It counts gazebos and trellises as accessory structures, along with pools, spas and hot tubs.2 Swings and play structures on single-family and duplex lots are also exempt.1

No permit does not mean no rules. The City's zoning standards for accessory buildings, from Municipal Code 20.30.500, include:2

  • Size and height: one story, 650 square feet maximum unless a special use permit allows more, and 12 feet tall. With a pitched roof, 12 feet halfway up the slope and 16 feet at the peak.
  • Use: no living or sleeping space, no air conditioning, and no more than 2 plumbing fixtures.
  • Spacing: 6 feet from any other building, wall to wall.
  • Setbacks: 60 feet from the front property line (45 feet for a detached garage). Side and rear setbacks are 0 feet, except 10 feet on a corner lot's street side and 4 feet on a key lot.

Rear yard coverage

The rear yard runs from the back wall of the house to the rear property line, across the full lot width. With a built-in pool, structures can cover up to 60% of it. Without one, the limit is 40%, and accessory buildings may not exceed 30%. Eaves up to 2 feet do not count.2

Near the property line

A building under 120 square feet that is at least 6 feet from other structures may sit on the property line without firewalls. Over 120 square feet and less than 5 feet from the line, walls parallel to the line need 1-hour fire protection, and overhangs must stay 2 feet from the line. No openings are allowed within 3 feet of the line. Between 3 and 5 feet, openings may not exceed 25% of the wall area.2

Fences

On single-family and duplex lots, the City's no-permit fence heights are 3 feet in the front yard and 7 feet in the side and rear yards.3 Corner lots are stricter:3

Fence heights allowed without a permit Top view of a single-family lot. Fences in the front yard, including the front part of the side fences, can be up to 3 feet without a permit. Fences along the side and rear yards behind the front yard can be up to 7 feet. House Drive Rear and side yards: up to 7 ft Front yard: up to 3 ft 7 ft 3 ft 7 ft 3 ft Sidewalk Street Not to scale
Fence heights allowed without a permit on a single-family or duplex lot, per the City. On a corner lot, fences along the street side are also limited to 3 feet. Planned development zones and pool barriers have their own rules.
  • Front yard along the street: 3 feet.
  • Side yard along the street: 3 feet.
  • Rear and side yards not along the street: 7 feet, but low enough to keep sightlines to the street from the driveway.

On irregular lots and in planned development (PD) zones, different limits may apply. A fence taller than the limits needs both a building permit and a planning permit.3

Pool barriers

When a building permit is issued for a new or remodeled pool or spa at a single-family home, state law requires at least two of seven drowning prevention features, such as an enclosure, removable mesh fencing, a safety cover or exit alarms.8 The City's rules for a pool enclosure: at least 60 inches tall, no more than 2 inches from the ground to the bottom, and no gap that passes a 4-inch sphere. Removable mesh fencing must meet ASTM F2286, stand at least 4 feet high, and sit at least 20 inches from the pool edge.7

Decks

A deck installation, replacement or repair needs a building permit if any one of these is true:4

  • It is 200 square feet or larger.
  • It is 30 inches or more above ground at any point.
  • It is attached to the house.
  • It serves a required exit door or serves as a door landing.

Permitted wood decks are built to Section R507 of the California Residential Code, which sets the design loads and ties deck guards to the guard rules.5 In the 2025 code, guards are required on open sides more than 30 inches above the grade below, measured within 36 inches of the edge. They must be at least 42 inches tall, with 34 inches allowed on the open sides of stairs, and no opening may pass a 4-inch sphere.6 Where 4x4 wood posts carry the guard load, they may not be notched where they connect to the deck.5

Patio covers and pergolas

San José publishes no patio cover or pergola handout. Its list of project bulletins covers decks, fences and retaining walls, and accessory buildings, but not patio covers.10 Patio covers are also not named on the City's list of exempt projects.1 The closest item on that list is awnings on a home that project no more than 54 inches and need no extra support.1 Before you build a patio cover, call the Building Division at 408-535-3555 and ask what your design needs.11 Open-air structures such as trellises and gazebos fall under the accessory structure rules above.2

Retaining walls

The City's thresholds:3

  • Over 2 feet above existing grade: a building permit, plus a Special Use Permit from the Planning Division. In a PD zoning district, a Planned Development Permit instead.
  • 4 feet or more from the bottom of the footing to the top, or holding a surcharge: a Grading Permit from Public Works as well.

A surcharge is pressure from earth or fill behind the wall with a back slope of 3:1 or steeper. The City's examples are soil sloping into the wall, footings of a structure resting on the retained soil, and vehicle loads on the retained soil.3 Public Works also says anyone building retaining walls in San José needs either a Notice of Exemption or a Grading Permit.9

Already built without a permit?

An oversized shed, a tall fence or an attached deck built without a permit can lead to a code enforcement case. See San José code violations, and when a San José remodel needs a permit. If a neighbor's project worries you, see how to report a code violation.

How we help

We are a licensed general contractor, CSLB #1050108. We check your lot type and the City's limits before we design, pull the building permit where one is needed, and schedule the inspections. If backyard work was done without a permit, see code violation and permit resolution, or every guide on the San José code compliance page.

PLANNING A BACKYARD PROJECT? Call or text (408) 667-4946 with your address and what you want to build.

Common questions

Do I need a permit for a shed in San José?
Not a building permit if it is 120 square feet or less and not electrically wired.1 It still has to meet the zoning standards for height, setbacks and rear yard coverage.2
How tall can a fence be in San José without a permit?
3 feet in the front yard and 7 feet in the side and rear yards, with lower limits along the street on corner lots. Taller needs a building permit and a planning permit.3
Does a ground-level deck need a permit?
Not if it is under 200 square feet, under 30 inches above ground at every point, not attached to the house, and does not serve an exit door or door landing. Any one of those triggers means a permit.4

Sources

This page explains the construction side of San José's rules. It is not legal advice. The City and its inspectors decide what applies to your property.

Planning a backyard project?

Call or text (408) 667-4946. We check the City limits and pull the permits. CSLB #1050108.
Get construction help