The Rules Before You Build a Fence
Independent research · Last reviewed August 2026 · General orientation, not legal advice
The short answer
Four things govern your fence: city or county code (height, setback, permits), your HOA (often stricter), property law (where your line actually runs), and pool barrier code if you have a pool. Typical limits are 6 ft in back yards and 3–4 ft in front — but every one of these is local, so confirm before you buy anything.
What actually governs your fence
Fence rules feel confusing because several separate systems apply at once, and people tend to ask one authority about all of them. Here's who controls what:
| What | Controls | Ask |
|---|---|---|
| City / county zoning code | Height, setback, materials in some areas, corner-lot sight lines, permits | Your city or county planning or building department |
| Building permit process | Whether you need one, and inspection | Same department — see the permits page |
| HOA covenants (CC&Rs) | Style, colour, material, height — often stricter than the city | Your HOA's architectural committee |
| Property law / your deed | Where your boundary actually runs; easements | Your deed, plat map, and a licensed surveyor |
| Pool barrier code | A separate, stricter standard if you have a pool | Building department — see pool requirements |
The rule that trips people up: city code and HOA covenants apply independently. An HOA can forbid a six-foot fence the city would happily permit — but it can never authorise something the city prohibits. You need a yes from both.
The order to do this in
Doing these out of order is how people end up moving a finished fence. The sequence that avoids that:
- Find your actual boundary. Deed, plat map, and survey pins — before anything else.
- Check your height limit and setback with the city or county for your specific lot.
- Get HOA approval if you have one — submit before you order, not after.
- Confirm the permit requirement and who is pulling it.
- Talk to your neighbour if the fence is anywhere near the shared line.
- Then choose materials and get quotes.
Property lines and setbacks
The single most expensive fence mistake is building in the wrong place. A fence over the boundary can have to come down at your cost, and in some circumstances long-standing encroachments create genuine legal complications.
Find the line properly
In rough order of reliability: your deed and plat map (usually available from the county recorder), existing survey pins at the lot corners — often iron rods a few inches down, findable with a metal detector — and, definitively, a new survey by a licensed surveyor. Do not rely on the previous fence, a hedge line, or where the mowing stops; all three are frequently wrong. Online parcel maps and satellite overlays are useful orientation but are not survey-accurate and should never be the basis for placing a fence.
Where you're allowed to put it
Many jurisdictions expect the fence a few inches inside your line, which keeps the whole structure — including footings and any lean — on your land and leaves room to maintain the far side. Some allow building directly on the line by agreement with your neighbour, which makes it a shared fence with shared obligations. Some require a genuine setback from the street or sidewalk.
If you build inside your line, remember you still have to maintain the outside face — which, in practice, means asking your neighbour to step onto their land.
Height limits
Typical residential limits, though yours may differ:
- Back and side yards: commonly 6 ft, sometimes 8 ft with a permit.
- Front yards: commonly capped at 3–4 ft for visibility and street character.
- Corner lots: a sight triangle near the intersection usually limits height to around 3 ft so drivers can see — the rule most often missed.
- Pool barriers: a separate standard — 48 in under the model code, 60 in statewide in Arizona — with gate and latch rules of its own. See pool fence rules by state.
This matters commercially, not just legally: if you want a privacy fence in a front yard capped at 4 ft, the honest answer is that a fence can't deliver privacy there and planting is the better route. Check the limit before you fall in love with a design.
For the actual numbers in 50 large US cities — front and back limits, permit thresholds and corner rules, each linked to the city's code — see fence height rules by city.
If you need more height than allowed, most jurisdictions have a variance process — an application, a fee, sometimes a hearing where neighbours can object. It's slow but it exists.
Raising an existing fence: toppers, lattice, and the permit trap
“How do I make my fence taller?” is the most-asked height question there is, and it is usually a privacy problem: a 6 ft fence and a neighbour's raised deck or second-storey window. Three things are true about it that the lattice-topper aisle does not mention.
First, the extension counts. Nearly every code measures the total height of the structure, so a 6 ft fence with a 2 ft lattice topper is an 8 ft fence. If your limit is 6 ft — the most common back-yard cap — the topper puts you over it, and it is exactly the kind of change a neighbour reports. Some jurisdictions allow an open lattice or trellis section above the solid limit; many do not distinguish. Ask before you buy.
Second, the posts were sized for the fence you have. Adding height adds wind load at the top of the lever, where it does the most damage. Post extenders bolted to existing 4×4s are the weakest part of the whole assembly, and a 6 ft fence on 2 ft footings was never designed to carry 8 ft. Raising a fence properly usually means new, deeper posts — at which point you are close to the cost of replacing it.
Third, there is often a better answer than height. Screening is usually about one sightline, not the whole boundary. A single trellis panel, a pergola, or a tall planting positioned where the sightline actually crosses the yard solves the problem without triggering height rules at all, because plants are not fences under most codes.
Local rules vary. Height caps, whether an open topper is counted, and what triggers a permit are all local. Confirm with your building department — and your HOA — before extending anything.
Neighbours: ownership, cost-sharing, and the finished side
Who owns it
Generally, whoever paid for it and whose land it sits on. A fence entirely inside your boundary is normally yours alone — you maintain it and you decide about it. A fence straddling the line is typically jointly owned, with both owners responsible for upkeep. Several states have statutes about shared boundary fences and cost-sharing, and they differ enough that a real dispute warrants local legal advice rather than a general article — see neighbor fence laws by state for what each state's statute says, with its text.
Splitting the cost
If a neighbour agrees to share, put it in writing before work starts — who pays what, who owns it, who maintains which side, and what happens if one of you sells. A short signed note covering those four points prevents most of the disputes that otherwise surface years later. A neighbour is under no obligation to contribute to a fence you want and they don't, unless a local statute says otherwise.
Which side faces out
Convention — and in some places code or HOA rules — puts the finished side facing outward, leaving posts and rails on your side. It's worth doing even where it isn't required; it's the cheapest goodwill available on a shared boundary. A shadowbox or board-on-board fence looks identical from both sides and sidesteps the issue entirely, which is exactly why it's marketed as a “good neighbour” fence.
Working out whose fence it is
There is no universal marker, and the folk rules are unreliable — the idea that you own the fence on a particular side of your lot is a convention in some places and simply false in others. What actually settles it, in order: the survey or plat showing where the line runs relative to the fence; the deed and any recorded agreement, which sometimes assigns a boundary fence explicitly; and who paid, where anyone can still evidence it. The rails-and-posts side is a hint about who built it, not proof of who owns it.
The “7 year fence law”
This comes up constantly and it is largely a myth. There is no national seven-year rule, and a fence in the wrong place does not transfer land simply by standing there. What people are half-remembering are two separate doctrines: adverse possession, which requires possession that is open, exclusive, continuous and hostile for a statutory period, and boundary by acquiescence, which turns on both owners having treated a line as the boundary over time. The statutory period varies widely by state — seven years in Georgia, ten in Iowa, fifteen in Michigan, twenty in Delaware are all reported figures — and every element has to be met, not just the clock.
The practical takeaway is the same either way: if a fence is on the wrong side of the line, raise it early and in writing. Time works against the person who says nothing, and a boundary question that is cheap to resolve in year one is expensive in year fifteen.
Tell your neighbour before work begins, even when you don't need their permission. Most boundary disputes start as surprises rather than disagreements.
HOA rules
If you're in an HOA, its architectural committee usually has to approve the fence before installation, and it can regulate things the city doesn't care about — style, colour, material, even picket spacing. Common restrictions include banning chain link in front yards, requiring a specific stain, capping height below the city limit, and mandating that the finished side face out.
Submit early. Approval commonly takes 30 to 60 days, and installing first and asking later routinely ends with the fence coming down at the owner's expense. HOA fence rules covers the approval process, what a committee can and can't restrict, and what happens if you build without it.
The five expensive mistakes
- Assuming the old fence was on the line. It frequently wasn't.
- Skipping the permit and getting a stop-work order or a removal notice.
- Building before HOA approval.
- Missing the corner-lot sight triangle and having to cut a new fence down.
- Not calling 811 before digging — free, usually required, and hitting a utility line is both dangerous and expensive.
Local rules vary. Everything on this page is general orientation. Fence rules are set locally and vary widely; boundary and ownership law varies by state. Confirm specifics with your city or county, use a licensed surveyor for boundary questions, and consult an attorney for a dispute. This is not legal advice.
Keep going
Frequently asked questions
- How tall can my fence be?
- Typically 6 ft in back yards, 3–4 ft in front, with tighter limits on corner lots. Set locally — confirm before ordering.
- How close to the property line can I build a fence?
- Often a few inches inside your line, though some areas allow building on it by agreement. Setbacks vary locally — and knowing where the line actually runs matters more.
- Who owns the fence between two houses?
- Usually whoever paid and whose land it sits on. A fence straddling the line is typically shared. State rules vary — get advice for an actual dispute.
- Do I need a permit to build a fence?
- Often yes, especially above a height threshold. See when you need a fence permit.
- Can my HOA override the city's fence rules?
- Both apply. An HOA can forbid what the city allows, but cannot authorise what the city prohibits. HOAs are usually stricter.
- Which side of the fence faces the neighbour?
- Convention (and some codes) puts the finished side outward. A shadowbox fence looks identical from both sides and avoids the question.
- What is the 7 year fence law?
- There isn't one nationally. It conflates adverse possession and boundary by acquiescence, whose periods range from about 7 to 20 years by state. A fence alone never transfers land.
- How do you tell if a fence is yours or your neighbour's?
- The survey or plat settles it, then the deed or a recorded agreement, then who paid. The “your side” rule is a local convention, not a legal test.
- My neighbour won't pay for the fence — what can I do?
- Usually nothing compels them, unless a state boundary-fence statute or recorded agreement applies — worth checking locally. The clean route is to build wholly on your own land and own it outright.
- Can I make my existing fence taller?
- Physically yes; legally often not — a topper counts toward total height, and the existing posts were not sized for it. Screening the one sightline that matters is usually the better fix.