There is no single New York fence code. The state leaves fence rules to each city, town, and village, so permits, height, setbacks, materials, and placement depend on where your property sits. The one meaningful statewide layer is the Residential Code’s safety barrier requirement for swimming pools. Everything else, including whether you need a permit at all, comes from local law.
That local-first framework is why two neighbors on opposite sides of a municipal line can face very different rules for the same six-foot fence. It is also why “checking the code” in New York means checking your municipality’s code, not a single statewide statute.
When You Need a Permit
In New York City, one- and two-family homeowners can install a fence up to six feet tall without a permit. Anything taller, or a fence on any other property type, requires a Plan/Work Approval Application (form PW1) filed with the Department of Buildings.1NYC 311. Fence Permit
Outside the city, the answer varies municipality by municipality. The Town of Hempstead requires a building permit for fence work.2Town of Hempstead. Building Department Brookhaven lists fences as a permit category for new residential construction.3Town of Brookhaven. Permits Fees are modest where they apply. Buffalo charges $25 for a residential fence permit and $50 for a commercial one.4eCode360. City of Buffalo, NY Fees – Chapter 103, Building Construction and Demolition Rochester charges a flat $50 for a residential fence permit.5City of Rochester. Fences Residential – Self-Serve Permitting Instructions
Most local applications ask for a property survey or site plan showing exactly where the fence will run. Some municipalities also require you to notify the neighbors along a shared line before installation. Skip the permit when one is required and the building department can issue a stop-work order mid-installation, fine you, or ultimately order you to tear the fence out at your own expense.
Height and Setback Limits
Height is the rule most homeowners run into first, and it depends on which part of the yard the fence sits in. New York City caps residential fences at six feet in most districts under the Building Code. The Zoning Resolution tightens that to four feet in front yards. In the lower-density R1 through R5 districts, the four-foot ceiling applies in the front, side, and rear.1NYC 311. Fence Permit Fences that predate April 30, 2008 may be allowed up to six feet even in those lower-density zones.
Outside the city, many municipalities follow a similar four-feet-in-front, six-feet-in-back pattern, but the exact numbers vary. Check your local zoning code before ordering materials.
Setback rules govern how close the fence can sit to a property line, a street, or a structure. Some municipalities let you build right on the line; others require a few inches to several feet of clearance, particularly for taller fences. Corner lots almost always face stricter treatment because of driver sightlines. Local codes typically define a “sight triangle” at the corner where nothing above roughly three feet is allowed, with the exact dimensions set locally. If you live on a corner, confirm those numbers before assuming the standard height limit applies along your side street.
Materials and Construction
Local codes also govern what your fence can be made of. In New York City, chain-link is generally acceptable in rear yards but can face restrictions in front yards on aesthetic grounds.6NYC.gov. Fences and Backyard Sheds The Town of North Hempstead bans barbed wire, electrified fencing, and similar hazardous materials on any fence.7eCode360. Town of North Hempstead Chapter 70 Zoning – Article XI Accessory Buildings and Structures Outright bans on those materials are common in suburban residential zones; agricultural and industrial areas tend to allow more.
Many municipalities require the finished, more visually appealing side of a fence to face outward toward neighbors or the street. This is the “good neighbor” rule. Structural specifications also appear in local code. Some Long Island towns require fence posts set in concrete to a minimum depth to handle high winds, and coastal jurisdictions may require wind-resistant spacing between pickets, reinforced posts, or corrosion-resistant materials.
Swimming Pool Barriers: The Statewide Rule
If your fence encloses a residential pool, statewide requirements apply on top of anything your municipality says. Under the Residential Code of New York State, the barrier must be at least four feet (48 inches) tall, and the gap between the bottom of the barrier and the ground cannot exceed two inches.8New York Department of State. Summary of Requirements for Swimming Pools and Spas
Vertical spacing rules depend on the design. Where horizontal members are closely spaced (less than 45 inches between the tops of horizontal rails), vertical gaps cannot exceed 1¾ inches. Where horizontal members sit farther apart, vertical gaps up to four inches are allowed. Chain-link mesh openings cannot exceed 2¼ inches unless slats reduce them to 1¾ inches.8New York Department of State. Summary of Requirements for Swimming Pools and Spas
Gates carry their own detailed rules. Every gate must be self-closing and self-latching. Pedestrian gates must open outward, away from the pool. The latch must sit at least 40 inches above grade and on the pool side of the gate. If the latch is below 54 inches, it must be recessed at least three inches below the top of the gate, with no openings larger than half an inch within 18 inches of the latch. Gates must be securely locked when the pool is not in use.8New York Department of State. Summary of Requirements for Swimming Pools and Spas A pool fence that fails inspection on any of these points can hold up your certificate of compliance.
Utility Easements
Before you order fencing, pull your property survey and deed and look for utility easements. These are strips of land where a utility, municipality, or drainage authority holds the right to access buried infrastructure. Build a fence across one and the easement holder can remove it to reach what is underneath, generally without paying you for the damage or replacement.
Some municipalities prohibit permanent structures in easements outright. Others allow fences with conditions, such as ground clearance for water flow, gate placement aligned with maintenance access, or removable sections. Chain-link tends to get approved more readily than solid privacy fencing in easement areas because it does not block water. If you need to run a fence through an easement, get written approval from both your municipality and the easement holder before you build.
Historic Districts and Agricultural Land
Two categories of property sit outside the usual rules in opposite directions.
Under New York’s Agriculture and Markets Law, local governments cannot unreasonably restrict farm operations within agricultural districts unless public health or safety is at stake.9New York State Senate. New York Agriculture and Markets Law 305-A – Coordination of Local Planning and Land Use Decision-Making In practice, height limits, material restrictions, and aesthetic rules that apply to suburban homeowners often do not reach fences used to contain livestock or protect crops.
Properties listed on the State or National Register of Historic Places, or located inside a locally designated historic district, face the reverse: extra review, not less. The New York City Landmarks Preservation Commission must approve exterior work on any designated landmark property, including fence installation.10NYC Landmarks Preservation Commission. Applications – LPC Cohoes requires fences within its historic district to be reviewed by the Historic Preservation and Architectural Review Board before a building permit is issued.11City of Cohoes. Fence Permit Application These reviews focus on design, materials, and scale.
Boundary Lines, Shared Costs, and Spite Fences
Neighbor disputes usually turn on three things: where the property line actually runs, who pays for a shared fence, and who maintains it. New York does not have a partition fence statute that forces neighbors to split the cost of a boundary fence the way some other states do. If your neighbor will not contribute, you generally pay the full cost yourself unless you have a written agreement.
Boundary disagreements are cheaper to resolve before the fence goes in than after. A professional land survey typically runs $300 to $1,500 for a standard residential lot, more in dense urban areas. If a fence does end up encroaching on someone else’s land, New York’s Real Property Actions and Proceedings Law allows the affected owner to sue for an injunction ordering removal, and a court can award money damages instead of removal when the circumstances justify it.12New York State Senate. New York Real Property Actions and Proceedings Law 871 – Action for the Removal of Encroaching Structures
New York also has a spite fence statute. Under Real Property Actions and Proceedings Law Section 843, a fence or structure that serves no useful purpose and was erected maliciously to harm a neighbor can be treated as a private nuisance.13New York State Senate. New York Real Property Actions and Proceedings Law 843 – Fences and Structures, When Private Nuisance The law protects homeowners who build in good faith, so intent is the central issue. Evidence that tends to matter includes the timing of construction relative to a dispute, communications from the neighbor, and unusual height or placement. A court that finds the fence qualifies can order removal, award damages, or both.
For conflicts short of encroachment or a spite claim, mediation through New York’s Community Dispute Resolution Centers is often faster and cheaper than court and is available whether or not you have a case filed.14NYCOURTS.GOV. Community Dispute Resolution Centers Program (CDRCP)
When Your Plans Do Not Fit the Rules
If your fence design conflicts with a height or setback rule, you can apply to your local zoning board of appeals for a variance. A fence variance is usually classified as an area variance because it concerns dimensional requirements rather than the use of the land. The typical path is to apply for the permit, get denied by the zoning enforcement officer, and appeal that denial to the board.15New York Department of State. Zoning Board of Appeals
The board weighs your benefit against the impact on the neighborhood using five factors:
- Whether the variance would change the neighborhood’s character or harm nearby properties.
- Whether you could achieve your goal without a variance.
- How far the request deviates from the existing rule.
- Whether the variance would affect physical or environmental conditions in the area.
- Whether you caused the problem yourself, such as by buying a lot knowing the restriction existed.
A self-created difficulty does not automatically disqualify you, but it weighs against approval.15New York Department of State. Zoning Board of Appeals Hearings are public, and neighbors typically have the right to testify. Approval is not guaranteed, so understanding those factors before filing is often the difference between a workable request and one that gets denied.
What Violations Cost
Building without a required permit, or building something that violates height, setback, or material rules, triggers an enforcement process that escalates quickly. In Rochester, initial fines run $50 to $150 per violation, doubling with subsequent tickets and doubling again if you ignore the default date on the citation. Unpaid fines can be added to your property tax bill.16City of Rochester, New York. Code Inspection and Enforcement Other municipalities impose daily fines until the violation is corrected.
Beyond fines, you can be ordered to modify or remove the noncompliant fence at your own cost, and if you ignore the order, the municipality can hire a contractor to do the work and bill you. In cases involving something like blocked emergency vehicle access, authorities may order immediate removal without the usual notice period. You can appeal an enforcement action through the local zoning board of appeals or municipal court, but fines can continue to accumulate while the appeal plays out, which is why addressing the violation quickly is almost always cheaper than fighting it.