California Fence Height and Material Rules by City (2026)
Fences are one of the most commonly regulated property features in California. Nearly every city has specific rules about how tall your fence can be, what materials you can use, and where on your lot you can place it. Understanding these rules before you build or replace a fence can save you from costly code violations and disputes with neighbors.
General Height Limits
The most common fence height limits in California follow a standard pattern: up to 6 feet in side and rear yards, and up to 3.5 to 4 feet in front yards. This pattern holds across most major cities, including Los Angeles, San Diego, San Jose, and Sacramento. The front yard height limit is designed to maintain visibility for traffic safety and to preserve neighborhood aesthetics. Some cities allow taller front yard fences with a conditional use permit or variance, but the approval process can be lengthy and is not guaranteed.
Material Restrictions
Most California cities allow wood, vinyl, chain link, wrought iron, and masonry fences. However, some cities restrict certain materials in specific zones. For example, chain link fencing is prohibited or restricted in front yards in many cities, including portions of Los Angeles and Pasadena. Several HOA-governed communities have additional material and color restrictions that go beyond city code. Barbed wire is generally prohibited in residential zones throughout California, though it may be allowed in agricultural or industrial areas.
Setback Requirements
Fence setback requirements vary by city and by the type of fence. In most California cities, fences built along property lines do not require a setback, but fences near street corners must comply with sight-line triangles to maintain driver visibility. Corner lots often have the most restrictive fence rules because they have two "front yards" under zoning code. In San Francisco, fences in the required front setback area are subject to stricter height limits than those in side yards.
Good Neighbor Fence Law
California has a statewide "Good Neighbor Fence" law (Civil Code Section 841) that requires neighbors to share equally in the cost of maintaining a boundary fence. This law applies when both parties benefit from the fence. If you plan to build or replace a shared fence, you are required to provide your neighbor with at least 30 days written notice including the proposed design, materials, and cost. Disputes over boundary fences are one of the most common neighbor conflicts in California.
Permits and Inspections
Not all fences require a building permit in California, but many do. Generally, fences under 6 feet in height that are not made of masonry do not require a permit. Masonry walls and retaining walls almost always require permits and engineering review. Cities like Long Beach, Anaheim, and Riverside each have their own permit thresholds, so checking with your local building department before starting work is always recommended.