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.
- 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
| Project | No building permit when | What changes the answer |
|---|---|---|
| Shed or accessory building | 120 sq. ft. or less and not electrically wired1 | Zoning limits apply at any size2 |
| Fence | Up to 3 ft in front, 7 ft on sides and rear3 | Corner lots, PD zones, pool barriers3, 7 |
| Deck | Under 200 sq. ft., under 30 in. above ground, detached, not at an exit door or landing4 | Any one trigger means a permit4 |
| Retaining wall | 2 ft or less above existing grade3 | Surcharge or 4 ft from footing means a grading permit too3 |
| Patio cover | No City handout10 | Ask 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
- 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.
Common questions
Do I need a permit for a shed in San José?
How tall can a fence be in San José without a permit?
Does a ground-level deck need a permit?
Sources
- 1. City of San José: When Is a Building Permit Required?
- 2. City of San José: Accessory Buildings & Structures (zoning standards, Municipal Code 20.30.500)
- 3. City of San José: Fences & Retaining Walls
- 4. City of San José: Decks
- 5. California Residential Code, 2025 edition, Chapter 5, Section R507 (Exterior Decks)
- 6. California Residential Code, 2025 edition, Chapter 3, Section R321 (Guards)
- 7. City of San José: Swimming Pools, Spas & Hot Tubs
- 8. California Health and Safety Code 115922: pool and spa drowning prevention features
- 9. City of San José Public Works: Grading and Drainage
- 10. City of San José: Building Bulletins & Forms
- 11. City of San José: Adopted Building Codes
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.