State guide Reviewed November 2026

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

Usually not for an ordinary backyard fence. The 2025 California Residential Code exempts fences not over 7 feet, but cities and counties can amend that and zoning caps front-yard fences lower. A landowner who plans to spend money on a dividing fence must give the neighbor 30 days written notice, and equal cost sharing is presumed.

Statewide rule 2025 CRC R105.2; cities may amend it The state-adopted code exempts fences not over 7 ft high from a building permit.
Who issues it City or county building department Height and placement limits come from local zoning, often a separate review from the building permit.
Outside city limits Your county building department Counties enforce the state code in unincorporated areas (Health and Safety Code 17960).
Height that triggers it Over 7 ft under the state code Los Angeles: wood, vinyl, chain link or iron over 10 ft, masonry over 3.5 ft. San Francisco: over 6 ft side or rear, 3 ft front.
How California sets building rules. California has a mandatory statewide residential code, the 2025 California Residential Code (Title 24, Part 2.5), in effect since January 1, 2026, and its adoption table marks the building permit exemptions in Section R105.2 as adopted by the state, including by the state housing department for dwellings and their accessory buildings. Cities and counties enforce it and may amend it for local climatic, geological or topographical conditions (Health and Safety Code 17958.5 and 17958.7), but from October 1, 2025 to June 1, 2031 they may not make residential changes unless a listed exception applies.

What does California state code say about fences?

The 2025 California Residential Code (Title 24, Part 2.5), in effect since January 1, 2026, lists fences not over 7 feet high among the work exempt from a building permit (Section R105.2). The code's own Matrix Adoption Table, a nonregulatory aid, marks the R105.2 building items as adopted by the state agencies, including the housing department's HCD 1 column for dwellings.

Cities and counties may change it: the CRC (Section 1.8.6.1) says so, and Health and Safety Code 17958.5 allows changes reasonably necessary because of local climatic, geological or topographical conditions, effective once filed with the Building Standards Commission under Section 17958.7. From October 1, 2025 to June 1, 2031, new residential changes are barred unless an exception applies, such as one substantially equivalent to a change in effect on September 30, 2025.

Among the cities on this site, San Diego, San Jose and Sacramento use 7 ft. Los Angeles exempts wood, vinyl, chain link or iron up to 10 ft but not masonry over 3.5 ft. San Francisco requires a permit over 6 ft at the side or rear and over 3 ft at the front. Long Beach's code says 7 ft for non-masonry fences while its handouts say 6 ft 6 in, and masonry over 4 ft needs a permit. In several cities a fence that serves as a pool barrier is permitted with the pool.

Who issues fence permits, and what about unincorporated areas?

Health and Safety Code 17960 makes the building department of every city or county enforce the state building code. Inside a city, that is the city; outside city limits, the county building department, applying any county amendments and its own fees.

Height is mostly a zoning question. In the cities we checked, front-yard limits are 3 to 3.5 ft, and a fence that needs no building permit can still break a zoning limit. Fees are set locally; the city table on this page shows examples.

Who pays for a fence between neighbors?

California's Good Neighbor Fence Act, Civil Code 841, presumes that adjoining landowners share an equal benefit from a dividing fence and are equally responsible for the reasonable costs of building, maintaining or replacing it, unless they agree otherwise in writing.

A landowner who intends to incur costs for such a fence must give each affected neighbor 30 days prior written notice. The notice mentions the presumption of equal responsibility and describes the problem, the proposed fix, the estimated cost, the proposed cost split and the timeline. The presumption can be overcome by showing that equal sharing would be unjust.

Separately, Civil Code 841.4 makes a fence unnecessarily exceeding 10 feet, maliciously built or kept to annoy a neighbor, a private nuisance.

Can my HOA stop my fence?

It can require approval if its governing documents say so. In that case Civil Code 4765 sets the process: the association must provide a fair, reasonable and expeditious procedure, decide in good faith and not unreasonably, arbitrarily or capriciously, and put its decision in writing, explaining any disapproval and how to ask for reconsideration. Its decision may not violate a building code or other land-use or safety law. Section 4765 itself sets no fence height.

Can I build the fence myself?

Yes. Business and Professions Code 7044 exempts an owner building on their own property from contractor licensing when the improvements are not intended or offered for sale and the owner personally does the work or uses employees paid wages only. If you hire a fence builder, the under-$1,000 exemption in Section 7048 covers only small, minor jobs that need no building permit, and not someone who advertises as a contractor or employs others.

Fence Permit rules in the 6 California cities we have researched

Each row is read off our page for that city, which quotes the city’s own code section and fee schedule. Follow the city link for the conditions on each rule, the worked fee examples and the sources.

CityOrdinary fenceBuilding permit starts atZoning height caps: front · side and rearCity fee for a 6 ft wood fence
Long BeachExempt below a height ⚠Over 7 ft in the code, 6 ft 6 in on the handouts; masonry over 4 ft3 ft front (4 ft in the special fence height area with an open top foot) · 6 ft 6 in; 8 ft along an alley, nonresidential use or major arterial$0; a 60 ft block wall about $975; a 40 ft 8 ft wood fence about $590
Los AngelesExempt below a heightOver 10 ft for wood, vinyl, chain link or iron; masonry over 3.5 ft3.5 ft front in R zones · 8 ft side and rear on lots 40 ft or wider (6 ft narrower or hillside)$0; a permitted masonry wall about $338 at $5,000
SacramentoExempt below a heightOver 7 ft; retaining walls over 4 ftSet by City Code Chapter 17.620; figures not quoted on the city's permit pages · same$0; over 7 ft about $291 for a $3,500 job ($554 if Planning charges its $263 minimum)
San DiegoExempt below a heightOver 7 ft, masonry included3 ft solid at the front line rising to 6 ft at the setback (6 to 9 ft if open) · 9 ft, open above 6 ft$0; a fence over 7 ft about $3,310 per 100 ft
San FranciscoExempt below a heightOver 6 ft at the side or rear; over 3 ft at the front3 ft solid, 6 ft if 75% open, in the front setback · 10 ft in required yards, over the counter$0; an 8 ft backyard fence about $1,150 (DBI valuation fees + $504 Planning fee)
San JoseExempt below a heightOver 7 ft3 ft in the front setback area · 7 ft (6 ft where grade drops more than 2 ft across the line)$0; a permitted fence about $585 ($211 processing + Tier 1 inspection + plan check)

A ⚠ marks a city whose own documents give two different answers. To compare more cities, see fence permit rules in 30 cities and fence permit fees in 30 cities.

Not in one of these cities?

The rule that binds you is the one your own city has adopted, or your county’s if you live outside city limits. Ask the building department for its list of work exempt from permit and its zoning rules for accessory structures before you buy materials; the phone call is free and the answer is specific to your lot.

Frequently asked questions

The state residential code exempts fences up to 7 feet, but cities and counties can amend it. Los Angeles exempts wood, vinyl, chain link or iron fences up to 10 feet, San Francisco requires a permit over 6 feet at the side or rear and over 3 feet at the front, and front-yard zoning limits in the cities we checked are 3 to 3.5 feet.
Civil Code 841 presumes adjoining owners share equally in the reasonable cost of a dividing fence unless they agreed otherwise in writing. If you intend to spend money on it, you must give 30 days written notice describing the problem, the fix, the cost and the proposed split. The presumption can be overcome if equal sharing would be unjust.
Civil Code 841.4 makes a fence or fence-like structure unnecessarily exceeding 10 feet in height, maliciously built or maintained to annoy the neighbor, a private nuisance. The affected neighbor can seek the remedies the Civil Code provides against a nuisance.
Your county. Health and Safety Code 17960 requires every city or county building department to enforce the state building code within its jurisdiction, so outside city limits the county building and planning departments apply the state code, any county amendments and their own zoning height limits.
If its governing documents require approval, yes, but Civil Code 4765 then requires a fair procedure, a good-faith decision that is not arbitrary or capricious, and a written decision explaining any denial and how to request reconsideration. The decision cannot violate a building code or other land-use or safety law.

Sources

Every statement about state law on this page is taken from the documents below, read on the date shown at the top. Laws and adopted code editions change; the linked text is the authority, and your city or county building department has the final word on your project.

  • California Building Standards Commission, Codes page (2025 Triennial Edition of Title 24) — dgs.ca.gov
  • 2025 California Residential Code Section 1.1.1 (up.codes mirror); 2025 California Residential Code R105.2 Building item 2 (up.codes mirror); 2025 California Residential Code, Chapter 1 Division II adoption note (up.codes mirror); 2025 California Residential Code, Chapter 1 Matrix Adoption Table (nonregulatory; up.codes mirror, table rendered with column labels in src_crc_2025_matrix_ch1.txt); 2025 California Residential Code Section 1.8.2.1.1 (up.codes mirror); 2025 California Residential Code, Section 1.8.6.1 (up.codes mirror); 2025 California Residential Code R105.2 (up.codes mirror) — up.codes
  • Health and Safety Code 17958.5(a); Health and Safety Code 17958.5(c); Health and Safety Code 17958.5(c)(1) — leginfo.legislature.ca.gov
  • Health and Safety Code 17958.7(a) — leginfo.legislature.ca.gov
  • Health and Safety Code 17960 — leginfo.legislature.ca.gov
  • Civil Code 841(b)(1); Civil Code 841(b)(2); Civil Code 841(b)(3) — leginfo.legislature.ca.gov
  • Civil Code 841.4 — leginfo.legislature.ca.gov
  • Civil Code 4765(a); Civil Code 4765(a)(1); Civil Code 4765(a)(2); Civil Code 4765(a)(3); Civil Code 4765(a)(4) — leginfo.legislature.ca.gov
  • Business and Professions Code 7044(a)(1); Business and Professions Code 7044(a)(1)(A); Business and Professions Code 7044(a)(1)(B) — leginfo.legislature.ca.gov
  • Business and Professions Code 7048(a); Business and Professions Code 7048(a), as amended by Stats. 2025, Ch. 67 (AB 1170); Business and Professions Code 7048(c)(2); Business and Professions Code 7048(c)(1) — leginfo.legislature.ca.gov

Related: California shed permit · California deck permit · California pool permit · Fence permit guide · All state guides

Stay up to date
Get notified when we add new cities or update permit fees.