Skip to content

Do You Need a Permit to Build a Fence in California?

Contractors will tell you fences under seven feet are fine without a permit. That is half true, and the missing half is what gets people torn-out fences. Here is what the state code actually exempts, and who really sets your height limit.

Sungjoon Nam
AI-assisted article · General information, not legal advice · details

Researched and written with AI tools. Property examples are illustrative analyses based on public records, and people described may be composites.

Do You Need a Permit to Build a Fence in California?
Photo by Emily Park on Unsplash

The fence contractor is standing in your driveway with a tape measure and says the magic words: "Anything under seven feet, you don't need a permit." It sounds authoritative, and it is genuinely in the code. Six months later a neighbor complains, a code enforcement officer comes out, and the six-and-a-half-foot fence you paid for has to come down to six feet — because the number the contractor quoted answers a completely different question than the one that mattered.

The short answer: California's building code says a building permit is not required for fences not over 7 feet high (§ R105.2). That is a permit threshold, not a height limit. How tall your fence may actually be is set by your city or county's zoning ordinance, and the same code section states plainly that a permit exemption never authorizes work that violates other local laws.

Key numbers

Item State code threshold Source
Fence, no building permit required Not over 7 feet high § R105.2
Fence, no building permit required (commercial code) Not over 7 feet high, excluding swimming pool barriers § 105
Retaining wall, no permit required Not over 4 feet, footing bottom to wall top, and not supporting a surcharge § R105.2
Detached accessory structure, no permit required Floor area not over 120 square feet § R105.2

Two different rulebooks are talking about your fence

This is the distinction that costs people money, so it is worth being precise about it.

The building code is about safety and construction: is the thing you built going to fall over, catch fire, or hurt someone? It decides whether the city needs to review your plans and send an inspector. Its answer for fences is a simple size cutoff.

The zoning code is about land use: what may go where on your lot, how tall, how close to the line. It is written by your city or county, it varies from one town to the next, and it is where fence height limits actually live. Zoning ordinances typically treat front yards differently from side and rear yards, and often restrict height near driveways and street corners so drivers can see.

The seven-foot figure belongs to the first rulebook. It tells you the city will not require a building permit. It tells you nothing about whether the fence is allowed to be that tall on your lot.

What the state code actually exempts

Here is the relevant line, verbatim:

"Fences not over 7 feet (2134 mm) high." (§ R105.2)

That item sits in a list of work that does not require a building permit under the residential code — the book that governs houses, duplexes and townhouses. The same list includes several things homeowners run into on the same weekend project:

  • One-story detached accessory structures — sheds, playhouses — with a floor area not over 120 square feet. Note that these may still be regulated under the state's wildland-urban interface rules despite being permit-exempt, if you are in a fire-hazard area.
  • Retaining walls not over 4 feet, measured from the bottom of the footing to the top of the wall, unless the wall supports a surcharge. Surcharge is the code's word for extra load pushing on the wall: a slope above it, a driveway, a structure. A three-foot wall at the base of a steep bank can still need a permit.
  • Sidewalks and driveways.
  • Prefabricated swimming pools less than 24 inches deep, and playground equipment such as swings.
  • Decks not exceeding 200 square feet, no more than 30 inches above grade at any point, not attached to a dwelling or townhouse, and not serving a required exit door.

Commercial and multifamily projects follow the parallel list in the building code, which reads almost identically — with one deliberate difference discussed below (§ 105).

The sentence that undoes the shortcut

Both versions of the exemption list open with the same warning, and it is the most important sentence in this article: exemption from permit requirements is not authorization to do work in any manner that violates the code, or any other law or ordinance of the jurisdiction.

Read plainly, that means a permit-exempt fence still has to obey:

  • Your city's zoning height limits, front-yard rules and corner visibility rules.
  • Any local fence permit or design requirement — a city is free to require its own planning-level permit even where the state building code asks for none.
  • Private restrictions the state code has nothing to do with, such as an HOA's rules or a recorded easement.

So "no permit needed" and "allowed" are not the same statement, and the code says so out loud.

Pool fences are the one carve-out to memorize

The building code's version of the exemption is worded as fences "other than swimming pool barriers" not over 7 feet high. That phrase is doing real work. A barrier around a pool is a life-safety device, not a privacy fence, and it is not something the code lets you put up unreviewed.

If your fence is doing double duty — enclosing the yard and serving as the pool barrier — treat it as a pool barrier. Talk to your building department about the height, gap, gate and latch requirements that apply before you order anything, because a barrier that fails inspection has to be rebuilt, not adjusted.

What this article cannot tell you

The state building code sets the permit threshold. It does not set your fence height limit, and none of the sections cited here contain one. That number lives in your local zoning ordinance, which differs city by city — including how height is measured on a sloping lot, whether lattice on top counts, and how front yards are treated.

So the honest sequence before you build is:

  1. Look up your city or county's zoning rules for fence height in your yard type — front, side, rear, corner.
  2. Ask the building department whether they require any local permit even for a permit-exempt fence.
  3. Confirm the fence is on your property, not the neighbor's, and that no easement runs where you are digging.
  4. Only then compare against the state's 7-foot building-permit threshold.

The state number is the last check, not the first one. Getting that order backwards is what turns a weekend project into a rebuild.

Sources

Frequently asked questions

Do I need a building permit for a fence in California?

Under the state residential code, a building permit is not required for fences not over 7 feet high (§ R105.2). The commercial code carries the same exemption, with swimming pool barriers deliberately carved out of it (§ 105). A permit exemption is not permission to ignore other rules — your city's zoning height limit still applies, and cities can require their own fence permit.

Is 7 feet the maximum fence height in California?

No. Seven feet is the point where a building permit becomes necessary under the state code, not a statewide height cap. Height limits for fences are set locally, in your city or county's zoning ordinance, and are commonly lower than 7 feet — especially in front yards and at corners where visibility matters. Check your local zoning code before you buy materials.

Does a pool fence need a permit?

The commercial building code's exemption is written as "fences, other than swimming pool barriers, not over 7 feet high" (§ 105) — pool barriers are pulled out of the exemption on purpose. Pool enclosures carry their own safety requirements for height, gaps, gates and latching, and are reviewed rather than waved through. Treat a pool fence as a permitted, inspected item and confirm the details with your building department.

Do retaining walls need a permit in California?

Not always. The state residential code exempts retaining walls not over 4 feet in height, measured from the bottom of the footing to the top of the wall — unless the wall supports a surcharge, meaning extra load such as a slope, a driveway or a structure above it (§ R105.2). A short wall holding back a steep hillside can still need a permit and engineering.

What happens if I build a fence taller than my city allows?

The state code is explicit that being exempt from a permit never authorizes work that violates other laws or ordinances (§ R105.2). In practice that means a fence built past the local zoning height can be ordered cut down or removed, usually after a neighbor complains. Verifying the local limit before building costs a phone call; fixing it afterward costs the fence.