· Fencing

Do You Need a Permit for a Fence in Massachusetts?

Most Massachusetts fences need a permit, but it comes from your town's zoning or building office, not from the state. Here is the part the fence blogs bury: there is no statewide fence height law in Massachusetts, and the State Building Code only forces a building permit once a fence tops 7 feet. So for a standard 6-foot backyard fence, whether you need a permit and how high you can go are both answered at town hall, under your local zoning bylaw. Planning a fence this year? Compare vetted local installers on the Massachusetts fencing hub.

This guide separates the three layers that everyone tangles together: the state building code, your town's zoning rules, and the civil law that governs you and your neighbor. Get those straight and the permit question stops being confusing.

Do you need a permit for a fence in Massachusetts?

Usually yes, and almost always from your town. Three different sets of rules can apply to one fence, and most homeowners only know about one of them.

  1. State Building Code (780 CMR). This is the only rule that is the same in every town. Under the Massachusetts State Building Code, a fence does not need a building permit unless it exceeds 7 feet in height. Andover, for example, states plainly that a building permit is required only if your fence is taller than seven feet. Framingham uses the same 7-foot trigger. Below 7 feet, the building code steps aside.
  2. Local zoning bylaw. This is where the real action is. Massachusetts towns have home-rule authority, so each one writes its own fence rules: whether a fence permit is required, how tall a fence can be in each part of the yard, how far it must sit from the lot line, and what happens on a corner lot. Two towns 10 miles apart can have completely different rules.
  3. Civil law between neighbors. Separate from any permit, Massachusetts has a spite-fence statute and property-line rules that can land you in court even if your fence passed every inspection.

The practical move: before you buy a single picket, call your town's building department and ask two questions. Do I need a fence permit, and what is the height limit for my lot? It is a five-minute call that prevents a tear-it-down letter later.

How high can a fence be in Massachusetts?

There is no single statewide number. The state building code caps the no-permit zone at 7 feet, but the height that actually binds you is set by your town's zoning bylaw, and it changes depending on where the fence sits on your lot.

Across most Massachusetts towns the pattern looks like this. Front-yard fences are kept low, often 3.5 to 4 feet, so the street stays open and sightlines at driveways and corners stay clear. Side and rear-yard fences are usually allowed up to 6 feet, which is why 6 feet is the default for a backyard privacy fence almost everywhere in the state. Cambridge is a concrete example: under its zoning ordinance, a fence in front of the rear building facade cannot exceed 4 feet if it would obstruct vision, and the last 25 feet of a solid fence approaching the sidewalk drops to 3 feet.

Where the fence sitsTypical town height limitWhy
Front yard (street-facing)3.5 to 4 ftKeeps streetscape open, protects sightlines
Side yard6 ftStandard privacy height
Rear yard6 ftStandard privacy height
Corner lot, near intersectionOften 2.5 to 3.5 ft inside a "visibility triangle"Drivers must see cross traffic
Anything above 7 ft, anywhereBuilding permit required under 780 CMRState code threshold

Treat the numbers above as the common pattern, not the law for your address. The exact limits, and the size of any corner-lot visibility triangle, are written into your town's zoning bylaw. Confirm yours with the building or zoning office before you order materials. If you are weighing a taller screen for seclusion, the privacy fence guide for Massachusetts walks through height, style, and what 6 feet actually blocks.

Building permit vs. zoning permit: what is the difference?

They are two different approvals from two different offices, and a fence can need one, both, or neither.

A building permit is triggered by the State Building Code. For fences, that trigger is height: above 7 feet you need one, at or below 7 feet you do not. The building department issues it.

A zoning permit (sometimes called a fence permit) comes from your town's zoning bylaw, not the state code. It governs placement: setbacks from the lot line, height limits by yard area, lot coverage, and corner-lot sightlines. Plenty of towns require you to file for a zoning or fence permit for a standard 6-foot fence even though no building permit is involved. Some towns fold both into a single application; others keep them separate. This is the distinction the contractor blogs routinely miss, and it is why "I do not need a building permit" does not mean "I do not need a permit."

When in doubt, the town's permitting counter will tell you which forms your fence needs. A registered fence contractor who works in your town should already know the local process; if they wave off permits entirely, that is a red flag.

What is the spite fence law in Massachusetts?

Massachusetts has one of the oldest spite-fence laws in the country, and it can override the usual "6 feet is fine" assumption. Under Mass. General Laws Chapter 49, Section 21, a fence that unnecessarily exceeds 6 feet in height and is maliciously erected or maintained to annoy the owners or occupants of the adjoining property is deemed a private nuisance. The injured neighbor can sue for damages.

Two elements have to be present: the fence has to top 6 feet, and the motive has to be malicious. A legitimate 6-foot or taller fence built for privacy, security, noise, or to screen an ugly view is not a spite fence just because your neighbor dislikes it. But a towering fence put up out of pure spite, with no real purpose, is exactly what this statute targets. If a boundary feud is part of your fence story, read the Massachusetts fence and property-line laws guide before you build, because intent and placement both matter here.

Which side of the fence faces out?

The "finished side faces the neighbor" rule is a widespread custom, and many towns and HOAs put it in writing, but it is not a statewide law. The good-looking side, the one without exposed rails and posts, traditionally faces outward toward the street and your neighbor. Most installers build it that way by default, and a lot of municipal bylaws and homeowners' association rules require it.

It is not universal, though. Andover, for instance, states there is no requirement regarding which way the fence faces. So the honest answer is: it is good etiquette and often a local rule, but check your own town's bylaw and any HOA covenants before you assume. If you share the cost of a boundary fence with a neighbor, agreeing on the finished side up front saves an argument later.

Do I need a permit for a fence in a historic district?

If your home sits in a local historic district, yes, and that approval comes before your building or zoning permit. Local historic districts in Massachusetts are created under Mass. General Laws Chapter 40C, and the district commission must issue a Certificate of Appropriateness before you make exterior changes that are visible from a public way, fences included. The commission reviews the fence's material, height, design, and how it fits the district's character.

This is not a formality you can skip. In 2025, a local historic district commission in Amherst ordered a homeowner to remove a fence that had been installed without the required certificate. Review can take up to 60 days, so if you are in one of the many historic districts across towns like Cambridge, Salem, Newburyport, Lexington, Nantucket, and dozens more, build that timeline into your plans. Call the historic district commission first; the building department will not issue a permit until the certificate is in hand.

Do I have to call Dig Safe before I dig fence posts?

Yes, and it is the law, not a suggestion. Under Mass. General Laws Chapter 82, Section 40, you must notify Dig Safe at least 72 hours before any excavation, and digging post holes for a fence counts. The requirement applies to homeowners doing their own work, not just contractors, and it covers private property.

The call is free. Dial 811 or (888) 344-7233, mark out your dig area first, and wait the 72 hours for the utilities to come flag their underground lines. Skipping it is expensive and dangerous: the Department of Public Utilities can issue a civil penalty of $1,000 for a first offense and $5,000 to $10,000 for a later offense within 12 months, and that is before you account for the cost and risk of striking a gas or electric line with a post-hole digger. If you are setting posts to the right depth anyway, the fence post and frost depth guide for Massachusetts covers how deep to go so the fence does not heave in winter.

A permit checklist before you build

Use this to figure out which approvals your fence likely needs. It does not replace a call to your town, but it tells you what to ask about.

Your situationBuilding permit?Town zoning/fence permit?Other
6-ft rear-yard privacy fenceNo (under 7 ft)Usually yes, check your townDig Safe 811 always
4-ft front-yard fenceNoUsually yesWatch corner sightlines
Fence taller than 7 ftYes (780 CMR)YesWatch spite-fence statute
Pool barrier fenceYesYesMust meet pool barrier code
Fence in a local historic districtAfter certificateYesCertificate of Appropriateness first (c.40C)
Replacing an existing fence in the same footprintOften noSometimes, askDig Safe 811 if digging

Pool fences are their own category and always require a permit and a code-compliant barrier; the Massachusetts pool fence code guide covers the gate, height, and latch rules that keep a backyard pool legal. And before you set a budget, the fence cost guide for Massachusetts breaks down what materials and labor actually run here.

FAQ

Do I need a permit for a 6-foot fence in Massachusetts? You almost certainly do not need a building permit, because the State Building Code only requires one above 7 feet. You may still need a zoning or fence permit from your town for a 6-foot fence, since placement and height are governed by local bylaw. Call your building or zoning office to confirm.

How high can a fence be in Massachusetts? There is no statewide limit. Most towns allow about 6 feet in side and rear yards and 3.5 to 4 feet in front yards, and the state building code requires a building permit for anything over 7 feet. Your town's zoning bylaw sets the exact number for your lot.

Can I build a fence right on the property line? Some towns allow it, others require a small setback, so this is a local zoning question. You also need to know exactly where the line is, a survey is worth it, and you should be aware of the spite-fence statute if relations with your neighbor are strained. The property-line laws guide covers ownership and maintenance of a boundary fence.

Do I really have to call Dig Safe to put up a fence? Yes. Massachusetts law requires notifying Dig Safe at least 72 hours before digging, and fence post holes count. It is free at 811, and the penalties for skipping it start at $1,000.

Do I need a permit to replace an old fence? Often not, if you are rebuilding in the same footprint at the same height, but some towns still want a permit and some treat it as new construction. Ask your building department before you pull the old one out, and call Dig Safe again if you are digging fresh holes.


Ready to put up a fence the right way? Get free estimates from vetted Massachusetts fence contractors who know your town's permit process, height limits, and the Dig Safe step before they ever break ground.

One form. Hundreds of contractors. You pick how many reply.

Describe your project and we’ll forward it to nearby contractors. Interested ones reach out — you pick the cap.

Find Fencing contractors