Fence Laws in Massachusetts (2026): Rules Your Neighbor Hopes You Don’t Know
Most people just start digging post holes. They pick a spot, buy some wood, and get to work. Then they get a notice from the town — or worse, from a lawyer.
In Massachusetts, fence laws are more detailed than you’d think. They cover height, materials, who pays for what, and even whether your fence is “malicious.” Let’s break it all down so you’re not caught off guard.
What Is a Legal Fence in Massachusetts?

Here’s something most homeowners don’t know. Massachusetts actually defines what counts as a “legal and sufficient” fence in state law.
According to Massachusetts General Laws Chapter 49, a lawful fence must be at least 4 feet high and in good repair. It must be built from approved materials. Those include rails, timber, boards, iron, or stone.
Honestly, that’s a pretty broad list. The law even recognizes brooks, rivers, ditches, and hedges as legal fences. Pretty much anything solid and maintained can count.
The key word is “good repair.” A broken-down fence isn’t a legal fence. It can actually be considered a public nuisance.
Basic Fence Rules in Massachusetts
Height Limits: Front Yard vs. Backyard
This is probably the part most people mess up. Height limits are different depending on where your fence sits on your property.
In the backyard, you can generally build up to 6 feet tall. In the front yard, that limit drops to 4 feet in most areas. Some towns set it even lower, at 3 or 3.5 feet, especially for solid fences.
Wondering if your side yard has different rules? It often does. Check with your local building department before you commit to a height.
Here’s where it gets interesting. Some towns like Marlborough set front yard limits as low as 3 feet within 15 feet of the front property line. Your town could be stricter than the state baseline. Always check locally first.
Do You Need a Permit?
Sound complicated? It can be. But here’s the simple version.
Massachusetts state law generally does not require a permit for fences under 6 to 7 feet tall. But your town might. Many cities and towns require permits for all fence installations, regardless of height.
In Lowell, you need a permit for any fence over 6 feet. In Plymouth, fences over 6 feet need both a zoning permit and a building permit. In Framingham, permits are required for fences over 7 feet tall. Andover also requires permits for fences over 7 feet.
The rule of thumb? Call your local building department before you start. Skipping a permit when one is required can mean fines, forced removal, and a very bad day.
Shared Fences and Your Neighbor’s Responsibility

Okay, this one’s important. If a fence sits directly on the property line between you and your neighbor, it’s called a “partition fence.” And partition fences come with shared responsibilities.
Massachusetts law requires both neighbors to share the cost of building and maintaining a partition fence. That’s equally split, unless you two make a different written agreement. Both sides need to keep it up. Neither side can take it down without the other’s permission.
You’re not alone if this surprises you. Most people assume a fence is just their own property. But if it’s on the line, it belongs to both of you.
What happens if your neighbor refuses to pay their share? Massachusetts law allows you to take legal action. You can sue to recover double the amount they owe you. If they still don’t pay within 30 days after that, a 1% monthly interest penalty kicks in. That adds up fast.
Spite Fences: Yes, That’s a Real Law
Wait, it gets better. Massachusetts actually has a law against “spite fences.” And it’s been on the books since 1887, making it one of the first states to pass such a law.
Under Massachusetts General Laws Chapter 49, Section 21, a fence is considered a spite fence if it unnecessarily exceeds 6 feet in height and is built or kept up with the goal of annoying a neighbor. The two key words are “unnecessarily” and “maliciously.”
Think of it like this. A 10-foot solid wood fence blocking your neighbor’s only window, built right after a dispute, is very different from a 10-foot fence around a swimming pool for safety reasons.
A spite fence is legally considered a private nuisance. Your neighbor can sue you for damages. A court can order you to remove the fence or reduce its height. Some courts have even ruled that rows of tall trees planted behind a fence to extend the “spite” are illegal too.
Personally, I think this law makes a lot of sense. Fences should serve a purpose — privacy, safety, property boundaries. Not revenge.
Fence Materials: What’s Allowed and What’s Not

Massachusetts state law doesn’t list many banned materials for standard residential fences. But local towns fill in the gaps.
In residential areas, materials like barbed wire, razor wire, and broken glass are generally prohibited. Electric fences may be allowed in rural or agricultural zones, but they require strict warning signs and must meet safety standards.
Common legal materials include wood, vinyl, chain link, and metal. Most homeowners go with wood or vinyl. Both hold up reasonably well in New England winters, though wood needs more upkeep.
Pretty straightforward. Stick to standard materials, and you’ll be fine in most neighborhoods.
Property Lines and Getting a Survey
Here’s a mini-story for you. A friend of mine built a fence last summer. She measured from the sidewalk. Felt confident. Six months later, she found out her fence was 18 inches into her neighbor’s property. She had to tear it out and start over.
Don’t let that happen to you.
The only reliable way to know where your property line is to hire a licensed land surveyor. Old fence lines, informal markers, and assumptions are not accurate. Property lines are often not where people think they are.
Most experts recommend placing your fence a few inches inside your property line. That gives you a buffer. It also lets you maintain the fence without stepping onto a neighbor’s land.
Pool Fences: Special Rules Apply
If you have a pool, regular fence rules don’t fully cover you. Massachusetts enforces specific pool safety laws under the State Building Code, 780 CMR.
Hold on, this part is important. Pool fences must be at least 48 inches tall. The gate must swing outward, away from the pool. It must close and latch automatically. The latch must be at least 54 inches off the ground so young children can’t reach it.
The fence also can’t function like a ladder. No horizontal bars close together that a child could use as steps. Vertical slats must be spaced close enough that a child can’t get footholds to climb.
Pool safety fences are required in Massachusetts. Missing one or having one that doesn’t meet code isn’t just a legal problem. It’s a genuine safety risk. Pool fences reduce drowning risks significantly.
How to Handle a Fence Dispute
Let’s talk about what happens when things go sideways with a neighbor.
Massachusetts has a historical system for fence disputes called “fence viewers.” These are local officials appointed by the mayor or town government. They can physically inspect a fence and make official determinations about whether it’s sufficient and whether a partition fence is required.
If a neighbor fails to maintain their part of a shared fence, you can file a complaint with the town. If they still don’t fix it, you can repair it yourself and seek reimbursement through the courts.
For more complex disputes, many communities offer mediation services. Mediation is faster and cheaper than going to court. It can often resolve things without damaging a long-term neighbor relationship.
If mediation fails, you can take the matter to court. Courts in Massachusetts can order fence removal, height reduction, or award damages.
HOA Rules: A Whole Other Layer
Don’t forget this one if you live in a neighborhood with a homeowners association. HOAs often have rules that are stricter than both state law and local ordinances.
Your HOA might regulate fence height, materials, color, style, and even the spacing between slats. You may need HOA approval before you can even apply for a building permit. Some HOAs require a signed maintenance agreement before any shared fence is built.
Check your HOA bylaws first. Then check local zoning. Then check state law. Yes, in that order.
How to Stay on the Right Side of the Law
Here’s what you need to do before building any fence in Massachusetts.
First, get a property survey. Know exactly where your lines are. Second, contact your local building department. Ask specifically about height limits, setback requirements, and permit rules for your address. Don’t guess. Third, if the fence will be on or near the property line, talk to your neighbor. Get any agreements in writing. Fourth, check your HOA rules if you have one. Fifth, apply for any required permits before you break ground.
Trust me, this works. A little prep time upfront saves massive headaches later.
Frequently Asked Questions
How tall can a fence be in Massachusetts? In most residential areas, up to 6 feet in the backyard and 4 feet in the front yard. Your town may set lower limits, so always check locally.
Do I need to notify my neighbor before building a fence? Massachusetts state law does not require it. But it is strongly recommended, especially if the fence will be near or on the property line. Some towns may require neighbor notification.
Who is responsible for maintaining a fence on the property line? Both neighbors share equal responsibility under Massachusetts law, unless you have a written agreement stating otherwise.
What is a spite fence and is it illegal in Massachusetts? A spite fence is one over 6 feet tall that is built or maintained with the intent to annoy a neighbor. It is illegal under Massachusetts General Laws Chapter 49, Section 21 and can lead to a lawsuit.
Can I use barbed wire for a residential fence in Massachusetts? Generally no. Barbed wire and razor wire are prohibited in residential areas in most Massachusetts towns. They may be allowed in rural or agricultural zones under strict conditions.
Final Thoughts
Massachusetts fence laws have a lot of moving parts. You have state law as the foundation. Then local ordinances on top. Then HOA rules if they apply. And special rules for pools, historic districts, and shared boundaries.
The good news? It’s all manageable. Know your property lines. Call your town before you build. Talk to your neighbor. Get agreements in writing. And if you’re ever unsure, a quick call to a local real estate attorney can save you a lot of money and stress.
Now you know what most of your neighbors don’t. Use it wisely.
References
- Massachusetts General Laws Chapter 49 – Fences, Fence Viewers, Pounds and Field Drivers
- Massachusetts General Laws Chapter 49, Section 21 – Spite Fences
- Mass.gov – Massachusetts Law About Neighbors and Trees
- FindLaw – Property Line and Fence Laws in Massachusetts
- Massachusetts State Building Code 780 CMR – Pool Safety Requirements