Fences and gates on Bay Area lots, from the post hole to the latch
Most Bay Area fence work is wood boards hung on posts set in the ground, and the posts are what give out, to rot and termites at the soil line. Two sets of rules shape nearly every job. State law presumes the owners on either side of a dividing fence share its reasonable cost and calls for written notice 30 days before either spends on it, while each city caps heights yard by yard, lowest at the street.
A white wooden picket fence with an open gate in front of a white weatherboard house. Photo: Jorge Royan, CC BY-SA 3.0, via Wikimedia Commons.
CSLB license class
C-13 Fencing, C-29 Masonry
Where it applies
Peninsula, East Bay, South Bay
Request
Free, up to five local pros reply
Fence and gate jobs on Bay Area homes
Replacing a fence two owners share
California's fence statute, rewritten in 2013, presumes that owners on each side of a dividing fence benefit equally from it and, unless they signed something saying otherwise, carry equal responsibility for the reasonable cost of building, maintaining or necessarily replacing it. Before an owner spends on such a fence, each affected neighbor is owed written notice 30 days ahead. That notice has to describe the problem, the proposed fix, the estimated cost, how the cost would be split and the timeline, which makes the contractor's written estimate the document the whole conversation turns on. The presumption does not reach a city, county or district owning the land next door.
New posts where the old ones snapped at grade
A wood fence usually fails at the line where its posts enter the dirt. UC's pest guidance for California homeowners advises termite-resistant wood or concrete footers for fences and other structures that must touch soil, and lists untreated fence posts and buried scrap wood near a house among the things to remove. It also warns that subterranean termites can build shelter tubes over treated wood to reach untreated wood above it, so a pressure-treated post topped with untreated rails is not a barrier. Exterior-grade pressure-treated lumber is the grade it names for wood left out in the weather.
Gates that drag, sag or will not latch
A gate is a fence's only moving part, and its weight hangs on two hinges and the post they are screwed into. When a gate drags or swings shut on its own, the cause is often the hinge post leaning, not the gate, and a new latch will not fix that. Gates around a pool are held to state law rather than taste: under the Swimming Pool Safety Act, an access gate through an enclosure must open away from the pool and close and latch by itself, with the latching device mounted no lower than 60 inches above the ground.
Front-yard fences and corner lots
Height rules change across one lot. Cities keep fences low between the house and the street, allow more along the side and rear lines, and clip corner lots so drivers can see cross traffic. The numbers are local. San Jose holds a fence to 3 feet inside a corner triangle reaching 45 feet along each street, measured at the outer edge of the curb, and Fremont holds anything inside its 20-foot sight triangle to 30 inches above the top of the curb. Hedges count: both cities write hedges into the same height limits as boards.
Block and concrete fence walls
A wall built of block or poured concrete along a lot line is a different job from a board fence, under a different license and often a different permit line. The CSLB puts masonry fences, with or without mortar, in the C-29 Masonry class rather than C-13. Building departments can treat them more strictly too: Fremont's no-permit list covers wood fences up to 7 feet but concrete and masonry walls only up to 4 feet. Where a wall also holds back soil, it is a retaining wall as well, and the retaining-wall rules apply.
The license this work needs
C-13 Fencing
C-29 Masonry
The CSLB's C-13 Fencing class covers constructing, erecting, altering and repairing fences of all types, plus gates, posts, railings, guard rails, game court enclosures and playground equipment, and it stops short of masonry walls. A block, brick or stone wall that serves as a fence belongs to C-29 Masonry, whose definition names fences installed with or without mortar. Replacing a few boards or rehanging a gate can stay with a handyman while labor and materials together remain under $1,000 and no permit is needed; beyond that, hire a licensed contractor (C-13) and look the number up at cslb.ca.gov.
UC's pest note on termites describes three groups in California, and fences give each of them something. Subterranean termites, which it calls very abundant in most parts of the state, nest in soil and attack wood touching it or reach wood through mud tubes. Drywood termites live above ground in dry, sound wood, and the note lists fences, decks and utility poles among what they infest. Dampwood termites favor very moist wood in cool, humid places along the coast. It adds that soil around a home usually holds buried wood such as roots, stumps or fence posts, so termites swarming in the yard do not by themselves mean the house is infested.
Wood fences that meet the house in a fire zone
The state Board of Forestry has been writing Zone 0 rules for the first 5 feet around buildings in State Responsibility Areas and in Very High Fire Hazard Severity Zones of the Local Responsibility Area. Its August 2026 draft would require a fence attached to an occupied structure, or within a foot of one, to have a 5-foot noncombustible span from that point, and would bar new combustible fences or gates within 5 feet. Repairs to an existing combustible fence could use combustible material, and existing homes would get up to five years for the fence work. When this page was written in October 2026, the Board's site said the package was in final review at the Office of Administrative Law, so check its status before redesigning.
Slopes, retaining walls and where height is measured
Many Bay Area back lines step up or down, and a fence there often stands on or beside a retaining wall. The 2025 California Residential Code exempts from a permit retaining walls up to 4 feet from the bottom of the footing to the top of the wall, unless the wall supports a surcharge, and some cities go further. How fence height is measured matters on a slope: Berkeley takes it from the lowest existing grade within 3 feet of any point of the fence, while Palo Alto measures from natural grade as its building official or planning director determines it.
Palo Alto writes its fence limits into the building code chapter on fences. A fence may reach 4 feet between the street setback line and the lot line, 6 feet beyond that line in a front or street side yard, and 7 feet in interior side and rear yards. Lots backing onto a frontage road, a railroad right-of-way or commercial land may have solid board fences up to 8 feet. Barbed wire is prohibited, and so are wire, twine or rope fences under 3 feet within 3 feet of a public sidewalk.
Berkeley requires no zoning permit for a fence of 6 feet or less in most districts; taller, on a lot line or inside the main building's setbacks, it needs an Administrative Use Permit. In the ES-R district on Panoramic Hill, which the zoning code calls exceptionally vulnerable to fire and earthquake damage, the line drops to 4 feet and the permit goes to the Fire Department for review and comment. Barbed or razor wire, jagged glass and razor spikes are banned from fences in residential districts.
Sunnyvale's Eichler Design Guidelines, adopted in July 2009, say a fence taller than 3 feet needs a permit from the Planning Division and one 6 feet or taller must sit at least 15 feet back from the front property line. They ask for simple, modern fences with a strong vertical or horizontal line in the manner of Japanese garden design. Where a model's front privacy fence was part of the original architecture, it should be kept or replaced, and plain wood without lattice usually fits.
Permits and rules to know
The 7-foot building permit line
The 2025 California Residential Code, in force since January 1, 2026, lists fences not over 7 feet high among the work that needs no building permit, and adds that an exemption does not authorize work that breaks any other code or ordinance. Cities adopt the code with local amendments, and the fence line moves with them. San Jose exempts fences up to 7 feet except swimming pool barriers, which need a permit. Fremont's exemption names wood fences up to 7 feet. Neither touches zoning, which usually sets a lower limit in front yards.
The Swimming Pool Safety Act
When a building permit is issued for a new or remodeled pool or spa at a private single-family home, state law requires at least two of seven drowning prevention features, and the building official inspects them before final approval. One feature is an enclosure isolating the pool from the house. It must stand at least 60 inches high, with no more than 2 inches between the ground and its bottom, no gap a 4-inch sphere can pass through, and no handholds or footholds a child under five could use to climb it.
811 before the first post hole
California's underground utility law requires an excavator to notify the regional notification center, reached by calling 811, at least two working days and no more than 14 calendar days before digging, not counting the day of the call, after marking the area to be dug. In Northern California that is USA North 811, which asks for the area to be outlined in white so locators can flag or paint the lines. A homeowner improving their own home with no permit is exempt but may still call; a contractor doing the digging is not exempt.
Before you hire
Ask what the new posts will stand in, concrete footers or termite-resistant wood, and whether the old post stubs come out.
For a shared fence, ask for a written estimate naming the problem, the fix and the cost, so it can go into the 30-day notice.
Ask who holds the 811 ticket and on what date, before the first post hole is dug.
On a front yard or corner lot, ask the contractor to confirm the city's height limit for that exact yard before ordering lumber.
For a pool fence or gate, ask how the gate will close and latch on its own and how high the latch will sit.
For a job over $1,000, check the C-13 license number, or C-29 for a block wall, at cslb.ca.gov.
Ask for proof of workers' compensation coverage before the old fence comes down.
How a request works
Describe the job
A few sentences and a photo of the problem or the space. It takes about a minute.
Local pros get in touch
Up to five handymen or contractors who take this kind of work may call or text to ask questions and quote.
Check, compare, decide
Look up the license, compare what you hear, and agree the scope and price with the one you pick. Requesting costs nothing.
Questions about fence and gate work in the Bay Area
My neighbor wants a taller, fancier fence than the one we have. Do I pay half of the upgrade?
Not necessarily. The even split is only a presumption, and a court weighing whether it would be unjust looks at whether costs are unnecessary or excessive and whether they come from one owner's aesthetic, architectural or other preferences. It also weighs whether the cost exceeds what the fence adds to the property's value, and any undue hardship. Answer the neighbor's notice in writing and propose the like-for-like replacement you would share.
Does a 6-foot backyard fence need a building permit in the Bay Area?
Usually not from the building department: the 2025 California Residential Code exempts fences up to 7 feet, and cities such as San Jose and Fremont keep that line with local changes. San Jose's exemption leaves out swimming pool barriers. The zoning height limit for that yard still applies, and Palo Alto, for one, allows 7 feet in interior side and rear yards but less nearer the street.
Is a concrete block wall along the property line a fencing job?
For licensing, no. The CSLB's C-13 Fencing class excludes masonry walls, and its C-29 Masonry class covers fences of concrete block, brick and stone, installed with or without mortar. Some cities also set a lower no-permit height for a block or concrete wall than for a wood fence; Fremont exempts wood fences up to 7 feet but concrete and masonry walls only up to 4 feet.
Do I have to call 811 just to dig a few post holes in my own yard?
The notice requirement exempts an owner of residential property who improves their own principal residence with excavation that needs no permit, although the law lets that owner call anyway, and USA North 811 says the free service is meant for homeowners and do-it-yourselfers too. The exemption does not cover the contractor you hire: a fence company digging the holes is the excavator and must call at least two working days ahead.
Our wood fence is screwed to the corner of the house. Will Zone 0 make us replace it?
Not yet, and only if the house is in a covered area: a State Responsibility Area, or a Very High Fire Hazard Severity Zone in the Local Responsibility Area. The Board of Forestry's August 2026 draft would require a 5-foot noncombustible span where a fence attaches to a home, with up to five years for existing homes. In October 2026 the package was still in final review at the Office of Administrative Law.
Does a hedge along the front count against the fence limit?
In several Bay Area cities, yes. San Jose's fence chapter defines a fence as any hedge, wall or other structure in the nature of a fence, so a hedge in a front setback is held to the same 3 feet. Fremont writes hedges into its limits by name, with 48 inches in a required front yard, though screening hedges in side and rear yards may reach 12 feet.
Checked against these public sources in October 2026. Codes and programs change: confirm permit rules with your city's building department and a license on the CSLB website before work starts.