Sources last checked: October 4, 2026
The state rule: 7 feet without a building permit
The 2025 California Residential Code, section R105.2, lists work that does not need a building permit. Fences are on that list:
Fences not over 7 feet high.
That is a building-permit rule, not a height allowance. The same section says an exemption does not authorize work that violates the code "or any other laws or ordinances of this jurisdiction." A city's zoning height limit still applies to a fence that needs no building permit.
Where the limit changes on the lot
Peninsula cities divide a residential lot into the same four zones, even when the numbers differ:
- Front setback — the strip between the street and the front of the house. Lowest limits, usually 3 to 4 feet.
- Side and rear yards — highest limits, usually 6 or 7 feet.
- Street side of a corner lot — in between, often 6 feet with a setback from the sidewalk.
- Visibility triangle — a triangle at a street corner or driveway where anything over about 3 feet is not allowed, so drivers can see.
It is measured along both street lines from the corner, so on a corner lot it can cover a large part of the front yard.
Peninsula cities at a glance
| City | Front setback | Side / rear | Corner and visibility | City page |
|---|---|---|---|---|
| Palo Alto | 4 ft | 7 ft | Street side yard 6 ft; 3 ft in 35-ft triangle at intersections | Palo Alto |
| Menlo Park | 4 ft | 7 ft | 3 ft within 35 ft of the street intersection | Menlo Park |
| Mountain View | 3 ft (first 20 ft) | 6 ft | Street side 6 ft, 5 ft from side line; 3 ft in 35-ft triangle | Mountain View |
| Redwood City | 3 ft solid; 5 ft combination solid/open | 7 ft | Street side 7 ft, 18 in from sidewalk; 3 ft in 15-ft triangle | Redwood City |
| Los Altos | 4 ft | 6 ft | 4 ft within 5 ft of corner side line; 3 ft in 25-ft triangle; 4 ft in 15-ft driveway triangle | Los Altos |
| Atherton | 6 ft along front lot line / street | 6 ft (8 ft at town boundary, schools, railroad) | 3 ft at street intersections | Atherton |
| East Palo Alto | 4 ft | 7 ft | 7-ft allowance generally excluded from the required side-street setback; 48 in within the 25-ft corner vision triangle | East Palo Alto |
| Los Altos Hills | Set by distance from road centerline | Set by distance from road centerline | Open 4½ ft at 30 ft, 6 ft at 45 ft; solid 3 ft at 30 ft, 6 ft at 60 ft | Los Altos Hills |
| Woodside | Set by distance from the road | Set by distance from the road | Open ≤4 ft: 10 ft from road; open 4–6 ft: 20 ft; solid 4–6 ft: 50 ft (30 ft in R-1) | Woodside |
| Portola Valley | Fence permit required in setbacks, on property lines and next to trail easements | Fence permit required in setbacks, on property lines and next to trail easements | — | Portola Valley |
Three patterns stand out:
- Seven feet is not universal. Palo Alto, Menlo Park, Redwood City and East Palo Alto allow 7 feet in side and rear yards. Mountain View and Los Altos stop at 6.
- Atherton is the exception in front. It allows 6 feet along a front lot line or public street, where its neighbors hold front fences to 3 or 4 feet.
- The hill towns measure from the road. In Los Altos Hills and Woodside, the question is less "how tall" than "how far from the road for that height," and an open fence can be closer than a solid one.
Open versus solid
Several cities treat an open fence differently from a solid one. Redwood City limits a solid front-yard fence to 3 feet and allows 5 feet for a combination solid/open fence. Its code defines an open fence as one that allows "direct vision through at least 80 percent of any one square foot" of its surface. Los Altos Hills and Woodside let open fences sit closer to the road than solid ones at the same height. Lattice on top of a solid fence is not automatically "open"; each city's definition decides.
How this looks in practice
A Menlo Park homeowner wants a 7-foot backyard fence for more privacy. Menlo Park allows 7 feet outside the front setback, and the city states wood fences up to 7 feet need no building permit.
The same 7-foot fence in Mountain View. Over 6 feet, Mountain View requires a planning permit and written consent from adjacent neighbors. For the building permit, the city's fence page lists one for a wood fence over 6 feet, while its exemptions page and the adopted building code exempt fences not over 7 feet; confirm with the Building Division. The city's fence page lists $1,780–2,480 for a fence up to 7 feet: a $1,580 planning permit plus a $200–900 building permit.
A corner house in Los Altos wants a front fence. Within the 25-foot triangle at the intersection the limit is 3 feet. Within 5 feet of the exterior side line, it is 4 feet.
An old fence in Woodside sits close to the road. Woodside's code allows an existing fence to be replaced in place if the new fence is a like material, no taller, and no closer to the property line, or if it is replaced by an open fence that meets the section (WMC § 153.212(B)(12)). A taller or relocated fence, or one in a different material, is new work and has to meet the current road setbacks: 50 feet for a solid 4–6-foot fence, 30 feet in R-1.
Frequently asked questions
Is 6 feet always allowed in a backyard in California?
No statewide rule guarantees it. Most Peninsula cities allow at least 6 feet in side and rear yards, but the city's zoning code controls. Hill towns tie height to distance from the road.
Does a fence that needs no building permit still have to meet height limits?
Yes. The building-permit exemption in CRC R105.2 does not override a city's zoning limits.
How is fence height measured?
Usually from grade at the base of the fence. Where the ground differs on the two sides, some cities measure from the lower side; Menlo Park does. Near street corners, some cities measure from the roadway.
Does a hedge count as a fence?
In several cities, yes, for the visibility triangle. Check the city page before planting along a corner.
Related guides
Sources
- California Residential Code (2025, with January 2026 errata), § R105.2. codes.iccsafe.org
- Palo Alto Municipal Code §§ 16.24.020, 16.24.040 (Supplement No. 82, 2026). codelibrary.amlegal.com
- City of Menlo Park, Fences and walls in residential areas. menlopark.gov
- City of Mountain View, Fences or Walls (residential). developmentpermits.mountainview.gov
- City of Mountain View, Projects that Don't Require Permits. developmentpermits.mountainview.gov
- Mountain View City Code § 8.36.05 (Ord. No. 9.2025, September 9, 2025); California Building Code (2025) § 105.2, Building, item 2. library.municode.com
- Redwood City Zoning Code, Article 36, § 36.3 (version of September 24, 2026; amended by Ord. 1130-892, July 27, 2026). library.municode.com
- City of Los Altos, Chapter 14.72 Fence Regulations. losaltosca.gov
- Atherton Municipal Code § 17.46.030 (current through Ord. 679, May 20, 2026). atherton.municipal.codes
- East Palo Alto Development Code § 18.26.020, as amended by Text Amendment ZTA24-001 (adopted March 18, 2025), and § 18.22.020. cityofepa.org
- Town of Los Altos Hills, Fences, Walls, Gates and Columns, October 17, 2025. losaltoshills.ca.gov
- Town of Portola Valley, Planning FAQs. portolavalley.net
- Woodside Municipal Code § 153.212 (version of June 8, 2026). library.municode.com
- Town of Woodside, Fence/Wall/Gate/Pylon/Berm Permit Application, rev. July 8, 2025. woodsideca.gov
General information, not legal advice. City codes change; confirm with the city's planning department before building.
Send photos
By calling or texting (650) 780-3325 you agree that if we miss your call we may reply by text. Consent is not a condition of any purchase or service. Msg & data rates may apply. Message frequency varies. Reply STOP to opt out, HELP for help.