How Far From the Property Line Can I Build a Fence?

In most U.S. municipalities, you can build a side-yard or rear-yard fence right up to the property line or within a few inches of it, while a front-yard fence typically has to sit behind a setback that runs anywhere from 5 to 25 feet or more. How far from the property line you can build a fence is not a national rule, though. It is set by your city or county zoning ordinance, and the answer changes from one jurisdiction to the next. Getting it wrong can mean tearing the fence out at your own expense, so the specifics are worth confirming before a single post goes in the ground.

Know Where the Line Actually Is

You can’t measure a setback from a line you’re guessing at. The most reliable way to locate your boundary is to hire a licensed land surveyor, who will research deed records, locate or set iron pins at each corner, and issue a certified survey plat. Expect roughly $1,200 to $5,500 depending on lot size, terrain, and whether older monuments still exist. That’s not cheap, but it is far cheaper than a forced teardown.

A less expensive starting point is your plat map, a scaled diagram of your lot usually included in closing documents or available from the county recorder for a small fee. The plat gives you dimensions to measure against, but it isn’t a substitute for a professional survey when precision matters. If the property was surveyed before, iron pins or concrete monuments may still be buried at the corners, and a metal detector can sometimes turn them up.

Setback and Height Limits in Your Zoning Code

A setback is the minimum distance a structure must sit from a property boundary. For fences, setbacks are set locally and they vary a lot. Some jurisdictions require no setback at all for side and rear fences, letting you build right on the line. Others require 1 to 6 feet of clearance. Front-yard fences almost always face stricter treatment: a larger setback, a lower height ceiling, or both.

Height limits tend to track the same front-versus-back pattern. Common residential rules look like this:

  • Front yard: maximum height of 3 to 4 feet, often with restrictions on solid (non-see-through) construction.
  • Side and rear yards: maximum height of 6 to 8 feet, with more flexibility on materials and style.

Those are ballpark figures. Your city’s code may set different numbers, and the only way to know is to look. Municipal zoning ordinances are usually posted on the city or county website under “planning” or “community development.” If the code is hard to parse, call the zoning office. You’ll get a straight answer faster than you will chasing cross-references.

Corner Lots and Sight Triangles

Corner lots carry an extra restriction that catches many homeowners by surprise. Most cities define a “sight triangle” at the intersection, a triangular zone formed by the two street edges and a line connecting them, where nothing above about 2.5 to 3 feet may block a driver’s view. Dimensions of 25 to 45 feet measured back from the intersection are common. A tall privacy fence inside that zone is both a safety hazard and a code violation, so if you’re on a corner, ask your zoning office for the exact sight-triangle dimensions before you lay anything out.

Easements That Override Your Setback

Even a fence that clears every setback rule can still be blocked by an easement. An easement is a legal right that lets someone else, usually a utility company or a local government, use a strip of your property for a specific purpose. Easements show up on your title report or plat map, and they’re worth reading before you finalize a layout.

Utility easements for buried power, water, or sewer lines are the most common. If the utility has to dig up a line and your fence is in the way, they can pull it out to do the work, and you pay for the replacement. Drainage easements work the same way, and a fence that redirects water onto a neighbor’s lot can expose you to liability for the flooding.

The practical rule is straightforward: don’t build inside an easement unless you have written confirmation from the easement holder that your fence is acceptable. Even then, treat anything within the easement as removable at your expense.

Permits and the 811 Call

Whether you need a building permit depends on the municipality. Some cities require a permit for any new fence. Others exempt fences below a threshold height (6 feet is a common cutoff) and only require permits for taller structures. Flood hazard areas, historic districts, and special zoning overlays often trigger permit requirements regardless of height.

Permit fees range from under $50 in small towns to several hundred dollars in larger metros. The process usually requires a site plan showing the fence location relative to your property lines, and the city may inspect the finished work. Skipping a required permit can bring stop-work orders, daily fines, and an order to remove the fence. Call the building department before you start.

Federal law separately requires you to call 811 before you dig. Under the national one-call system, utility operators will come out and mark buried gas lines, electrical conduit, fiber, and other underground facilities at no charge, typically within a few business days. Digging without calling exposes you to fines, repair costs for any line you hit, and personal injury liability. A ruptured gas line is not a paperwork problem, it’s an emergency. The call is free.

HOA Rules Layered on Top

If your home is inside a homeowners association, the HOA’s Covenants, Conditions, and Restrictions apply on top of the city’s zoning rules. CC&Rs are recorded against the deed and run with the land, so they bind every owner whether you read them before buying or not. They can regulate fence height, style, material, color, and precise placement, and HOA limits are frequently stricter than what the city allows.

Most associations require a written application with a site plan, sometimes with material samples and neighbor notification, before an architectural review committee will approve construction. Building first and asking later usually goes badly. The HOA can impose recurring fines and ultimately force you to modify or remove the fence at your cost. Pull the CC&Rs from the management office or the HOA website and read the fencing section before you commit to a design.

Building Directly on the Line

Putting the fence on the boundary itself creates what the law calls a boundary or partition fence. In many states, a fence sitting on the line is treated as shared property, and both neighbors share the cost of building and maintaining it. The details vary. Some states impose equal cost-sharing automatically; others only require a neighbor to contribute if they actually use or benefit from the fence.

Because shared ownership invites disagreement, a written agreement with your neighbor before construction is the single most useful thing you can do. Cover who pays what, the design and materials, and who handles future maintenance. A handshake works fine until one of you sells and the new owner claims ignorance.

Some states have “good neighbor” statutes that formalize the process, typically requiring 30 days’ written notice to adjoining owners with a description of the work and estimated costs, and offering mediation if a neighbor objects.

What Happens If You Build Too Close

A fence that crosses the property line, even by a few inches, is an encroachment on your neighbor’s land. If the neighbor objects, the outcomes range from awkward to expensive:

  • Negotiated fix: the neighbor may agree to let the fence stay in exchange for a written license or easement, sometimes for a fee.
  • Forced removal: if negotiations fail, a court can order you to tear the fence down and rebuild on your own side, at your cost.
  • Adverse possession risk: if a fence sits over the line for years without objection, the neighbor who maintained control of that strip could eventually claim ownership through adverse possession. Required periods run anywhere from 5 to 60 years depending on the state, and the risk cuts both ways.

Violating a setback or building without a required permit creates a separate set of problems. The city can issue a stop-work order mid-construction, impose daily fines until you comply, and require you to move or remove the fence. Code enforcement handles these cases routinely.

The cheapest fence dispute is the one that never happens. A professional survey, a call to the zoning office, an 811 locate, and a conversation with your neighbor will together cost a fraction of a single forced teardown. Do all four before the first post hole gets dug.