Fence laws in San Francisco, California
What the San Francisco municipal code says about fences, one topic at a time, with the section number and a link to the document behind every line. Where San Francisco sets no rule of its own, the California rule is shown in its place and marked as such.
Fence laws in San Francisco, California, question by question
The short version
- Who pays on the line
- Two neighbors split the cost of a fence on the line in California.
- How tall
- A fence in a required rear yard in San Francisco may stand ten feet above the ground. The figure is 10 feet, for a fence in a required rear yard. It reaches a required rear yard, and a required side yard where the lot has one only.
- Permits
- San Francisco runs three separate numbers and they answer three different questions. The figure is 6 feet, for height at which a side or rear fence starts needing a building permit.
- Pool barriers
- A pool fence in California stands at least sixty inches high. The figure is 60 inches, for minimum height of a pool enclosure.
- Spite fences
- A fence over ten feet tall in California is a private nuisance when it was put up or kept there to annoy the neighbor and the extra height serves no purpose. The figure is 10 feet, for spite fence threshold, with malice required.
- Measured from what
- Before the height rule can be applied in San Francisco, the front setback has to be worked out, and it is not a fixed distance. The figure is 15 feet, for the most a required front setback can ever be, or 15 percent of lot depth if smaller. It reaches RH, RM and RTO districts, which cover most San Francisco residential neighborhoods only.
- Corner lots
- California writes no clear view triangle into state law. It reaches the right of way of a state highway, whether or not the whole width is paved only.
- Retaining walls
- San Francisco leaves retaining walls to the Zoning Administrator, case by case. The figure is 6 feet, for fence above a retaining wall the Zoning Administrator may allow on a steep lot. It reaches lots with a substantial grade difference from the parcel next door only.
- Materials
- California sets a wire standard for a lawful fence in grazing counties. The figure is 3 strands, for barbed wires in a lawful wire fence. It reaches lawful fences in grazing counties only.
- Livestock
- California calls a fence lawful when it is strong enough to keep livestock from getting in or out. The figure is 4 feet, for height of the top wire on a lawful wire fence.
Who owns the fence between two properties in San Francisco?
Compare fences on the property line across all 50 states
California answers this in its own law. The words that do it are quoted below.
Two neighbors split the cost of a fence on the line in California. The law starts from the idea that both get the same benefit from it, so both owe the same share of building it, keeping it up and replacing it. A neighbor about to spend that money gives the other one thirty days written notice first. Either neighbor can show the even split is wrong, and a court can then order less than half or nothing at all.
This one is California law, not San Francisco law. All California findings
Adjoining landowners are presumed to share an equal benefit from any fence dividing their properties and, unless otherwise agreed to by the parties in a written agreement, shall be presumed to be equally responsible for the reasonable costs of construction, maintenance, or necessary replacement of the fence.
Also on fences on the property line in San Francisco
- set in state lawThe notice has to say six things: that the law starts from an even split, what is wrong with the fence now, what is planned instead, what it is expected to cost, how the cost gets shared, and when the work happens. Civ. Code 841(b)(1)California · Statute
How tall can a fence be in San Francisco?
Compare fence height across all 50 states
San Francisco answers this in its own law. The words that do it are quoted below.
A fence in a required rear yard in San Francisco may stand ten feet above the ground. Side yards, where a lot has them, get the same ten. That is four feet above the six almost every general answer gives, and the confusion is worth naming: six feet is where a building permit starts being needed in San Francisco, not where the height limit sits. Taller than ten is possible inside the buildable area of the lot, but that brings in neighborhood notification and design review.
In the required rear yard area, the maximum allowable height of a fence is 10 feet above grade.
10 fta fence in a required rear yard
Also on fence height in San Francisco
- no rule, documents checkedCalifornia sets no limit on how tall a fence at a house can be. Cities and counties write that in their zoning codes and the answer changes a lot from one town to the next. The one height in state law is the ten feet in the spite fence rule, and that only matters when the fence was put up to annoy a neighbor. It is not a building limit. Civ. Code 841California · Statute
- depends, see the pageIn the required front setback the answer turns on how much light gets through. A solid fence stops at three feet. A fence that is 75 percent open is allowed six. The department is explicit that a picket fence does not qualify unless the slats are very thin with large gaps, and that the two cannot be stacked: three feet of solid fence with anything on top of it is not permitted in the front setback. Front setbackSan Francisco · Agency guidance
Do I need a permit for a fence in San Francisco?
Compare permits across all 50 states
San Francisco answers this in its own law. The words that do it are quoted below.
San Francisco runs three separate numbers and they answer three different questions. No building permit is needed for a fence of three feet or less at the front, or six feet or less at the side and rear. Neighborhood notification is not needed below ten feet. And a fence of ten feet or less that meets the yard rules is usually approved over the counter rather than going to a hearing. Reading any one of those three as the height limit is the mistake this page exists to prevent.
A building permit is not required for a fence that is three feet or less in height at the front of a property, or six feet or less in height at the side or rear property lines.
6 ftheight at which a side or rear fence starts needing a building permit
Also on permits in San Francisco
- set in state lawCalifornia does not write its own building code from scratch. Section 17922 adopts Title 24 of the California Code of Regulations and requires it to ask for much the same things as the International Building Code and the International Residential Code, with state additions and cuts. So the permit rule for a fence starts out as outside code text that California then edits. Health & Saf. Code 17922California · Statute
- set in state lawA California city or county can make the statewide building code stricter, but not quietly. Section 17958.7 makes the city council say in writing why each change is needed because of local weather, ground or land shape. That finding goes to the California Building Standards Commission, and the change does nothing until it is filed. The finding is a public record, which is why a local permit line can sit well below the statewide one. Health & Saf. Code 17958.7California · Statute
- set in state lawGoing over the limit in a required yard normally means asking for a variance and justifying it. There is one place in San Francisco where that door is shut. A few streets carry a legislated setback, written into an ordinance rather than averaged from the neighbours, and no variance can be issued against one. Changing it takes the Board of Supervisors amending or repealing the ordinance, which is a different order of effort from a planning application. VarianceSan Francisco · Agency guidance
Pool fence requirements in San Francisco
Compare pool barriers across all 50 states
California answers this in its own law. The words that do it are quoted below.
A pool fence in California stands at least sixty inches high. No more than two inches may be left between the ground and the bottom of it, and no gap in it may pass a four inch ball. The outside face has no handholds or footholds a child under five could climb. Gates open away from the pool and close and latch by themselves, with the latch set no lower than sixty inches above the ground.
This one is California law, not San Francisco law. All California findings
An enclosure shall have all of the following characteristics: (a) Any access gates through the enclosure open away from the swimming pool, and are self-closing with a self-latching device placed no lower than 60 inches above the ground. (b) A minimum height of 60 inches. (c) A maximum vertical clearance from the ground to the bottom of the enclosure of two inches. (d) Gaps or voids, if any, do not allow passage of a sphere equal to or greater than four inches in diameter. (e) An outside surface free of protrusions, cavities, or other physical characteristics that would serve as handholds or footholds that could enable a child below the age of five years to climb over.
60 inminimum height of a pool enclosure
Spite fence laws in San Francisco
Compare spite fences across all 50 states
California answers this in its own law. The words that do it are quoted below.
A fence over ten feet tall in California is a private nuisance when it was put up or kept there to annoy the neighbor and the extra height serves no purpose. Height on its own is not enough. The case turns on proving why the fence is there. The rule covers anything built like a fence, not only a fence.
This one is California law, not San Francisco law. All California findings
Any fence or other structure in the nature of a fence unnecessarily exceeding 10 feet in height maliciously erected or maintained for the purpose of annoying the owner or occupant of adjoining property is a private nuisance.
10 ftspite fence threshold, with malice required
How fence height is measured in San Francisco
Compare how height is measured across all 50 states
San Francisco answers this in its own law. The words that do it are quoted below.
Before the height rule can be applied in San Francisco, the front setback has to be worked out, and it is not a fixed distance. It is usually the average of the setbacks of the two properties either side, so the line moves from lot to lot along the same block and the neighbours decide where it falls. A corner lot uses half the setback of its one neighbour. Where the buildings either side sit on the front property line there is no required setback at all. It is capped: never more than 15 percent of the lot depth or 15 feet, whichever is smaller.
The required setback for a property is usually an average of the setbacks of these two adjacent properties
15 ftthe most a required front setback can ever be, or 15 percent of lot depth if smaller
Also on how height is measured in San Francisco
- left to the townCalifornia gives a fence height and never says what it is measured from. Civil Code section 841.4 makes a fence over ten feet a private nuisance when it is kept up to annoy a neighbor. It does not say whether the ten feet starts at bare dirt, at the finished yard, or at the high side of a slope. Government Code section 65850 is why the state stops there: it lets any county or city set the place, height and size of structures. So the number and the surface it starts from are both written into local zoning. Cal. Gov. Code 65850(c)(1)California · Zoning code
Fence rules for corner lots in San Francisco
Compare corner visibility across all 50 states
California answers this in its own law. The words that do it are quoted below.
California writes no clear view triangle into state law. The Streets and Highways Code counts a fence as an encroachment once it stands in, under or over any part of a state highway right of way. Section 670 then makes putting one there without a written permit from the department a misdemeanor. That covers the public strip, not the corner of a private yard. Government Code section 65850 gives every city and county the power to set the height and place of structures, and that is where a corner triangle gets written in California.
This one is California law, not San Francisco law. All California findings
“Encroachment” includes any tower, pole, pole line, pipe, pipe line, fence, billboard, stand or building, or any structure, object of any kind or character not particularly mentioned in this section, or special event, which is in, under, or over any portion of the highway.
Retaining wall rules in San Francisco
Compare retaining walls across all 50 states
San Francisco does not set this. It leaves it to the Zoning Administrator, case by case.
San Francisco has no published figure for a fence on top of a retaining wall. Where two lots sit at very different levels the Zoning Administrator can allow six feet of fence above the wall, decided case by case, and the total height above the ground below stops mattering. So on a steep lot the answer is not in the handout at all. It is whatever the Zoning Administrator decides on that property.
the Zoning Administrator could authorize a fence up to six feet above a retaining wall on a case-by-case basis regardless of total height above the grade
6 ftfence above a retaining wall the Zoning Administrator may allow on a steep lot
The code hands this to the Zoning Administrator, case by case, which is not published in the code itself.
Also on retaining walls in San Francisco
- left to the townCalifornia has no rule of its own in statute for a wall that holds back earth. The rule is in Title 24 of the California Code of Regulations, which section 17922 adopts by reference and requires to match the newest editions of a named list of outside codes, the International Building Code and the International Residential Code among them. The same section leaves setbacks, side yards, rear yards and property line rules entirely to cities and counties. Health & Saf. Code 17922(a)California · Statute
Fence materials allowed in San Francisco
Compare materials across all 50 states
California answers this in its own law. The words that do it are quoted below.
California sets a wire standard for a lawful fence in grazing counties. A wire fence takes three tight barbed wires on solid posts set no more than a rod apart, with one wire at least four feet up. Any fence as strong and as tall as that one counts too.
This one is California law, not San Francisco law. All California findings
No wire fence is a good and substantial fence within the meaning of this article unless it has three tightly stretched barbed wires securely fastened to posts of reasonable strength, firmly set in the ground not more than one rod apart, one of which wires shall be at least four feet above the surface of the ground.
3 strandsbarbed wires in a lawful wire fence
Livestock and boundary fence law in San Francisco
Compare agricultural fencing across all 50 states
California answers this in its own law. The words that do it are quoted below.
California calls a fence lawful when it is strong enough to keep livestock from getting in or out. A wire fence gets real numbers: three tight barbed wires on posts set no more than one rod apart, with one of those wires at least four feet off the ground. Any other fence as tall, as strong and as good at holding animals counts too, and so does a cattle guard wide and deep enough to turn them.
This one is California law, not San Francisco law. All California findings
No wire fence is a good and substantial fence within the meaning of this article unless it has three tightly stretched barbed wires securely fastened to posts of reasonable strength, firmly set in the ground not more than one rod apart, one of which wires shall be at least four feet above the surface of the ground.
4 ftheight of the top wire on a lawful wire fence
Also on agricultural fencing in San Francisco
- depends, see the pageCalifornia answers this one county by county. Section 17123 names Siskiyou, Lassen and Modoc, plus parts of Trinity and Shasta, as land used mainly for grazing. Section 17124 lets the board of supervisors of any county put the same label on the county or part of it. Where the label applies, the land has to be fully fenced before the person on it may take in a stray animal or hold it for payment. Cal. Food & Agric. Code 17122California · Statute
Documents behind this page
10 documents, of which 1 was published by San Francisco itself. Each was read on the date shown.
- California LegislatureCalifornia Civil Code Section 841, Good Neighbor Fence Act of 2013
- California LegislatureCalifornia Civil Code Section 841.4, spite fences
- San Francisco Planning DepartmentGeneral Planning Information, Fences
- California LegislatureCalifornia Health and Safety Code Section 17922, adoption of building standards
- California LegislatureCalifornia Health and Safety Code Section 17958.7, local modification of building standards
- California LegislatureCalifornia Health and Safety Code Section 115923, enclosure requirements
- California LegislatureCalifornia Government Code, Title 7, Division 1, Chapter 4, Article 2, Section 65850
- California LegislatureCalifornia Streets and Highways Code, Division 1, Chapter 3, Section 660
- California LegislatureCalifornia Food and Agricultural Code, Division 9, Part 2, Chapter 3, Article 5
- California LegislatureCalifornia Food and Agricultural Code, Division 9, Part 2, Chapter 3, Article 5
What this page does not cover
A city ordinance is not the only rule that reaches a fence. The zoning district a parcel sits in can change the height allowed on it, and so can an overlay district, a recorded easement, a fire hazard severity zone or a coastal zone. A homeowner association can be stricter than the city and nothing in the municipal code will say so. None of those appear here.
The rules above are the ones San Francisco publishes, plus the California rules that apply where the city sets none. Fence laws in California has the state layer in full.
This is general information drawn from published government documents. It is not legal advice, ordinances are amended, and the date beside each finding is the date the document was read. How findings are made · What the terms mean