Do I Need a Permit to Build a Fence in Massachusetts?
Quick answer
Under the Massachusetts State Building Code, you don't need a building permit for a fence 7 feet or under. But most Massachusetts towns enforce local zoning bylaws with stricter rules — typically 4 feet in front yards and 6 feet in side and rear yards. Some towns require zoning permits for all fences. Pool barrier fences always require a building permit. Check with your town's building department before you start.
Massachusetts at a glance
Building code adopted
9th Edition of the Massachusetts State Building Code (780 CMR), based on the 2021 IRC/IBC
State authority
Massachusetts Board of Building Regulations and Standards (BBRS)
Common permit threshold
Under the state building code (780 CMR), a building permit is required for fences over 7 feet. Most towns also enforce local zoning bylaws that set lower height limits and may require permits for shorter fences.
Did you know?
Massachusetts has one of the oldest fence laws in the country — the 'fence viewer' system, codified in Massachusetts General Laws Chapter 49, dates back to colonial times and still allows towns to appoint officials who inspect and resolve boundary fence disputes between neighbors.
On this page
Two Layers of Regulation: State Code and Local Bylaws
Massachusetts fence regulation operates on two levels, and understanding both is critical before you start building.
The Massachusetts State Building Code (780 CMR), administered by the Board of Building Regulations and Standards, sets the statewide baseline. Under 780 CMR, a building permit is required for any fence over 7 feet in height. Fences 7 feet and under are exempt from the state building permit requirement.
But Massachusetts also grants its municipalities home rule authority, which means cities and towns can — and routinely do — adopt local zoning bylaws that are stricter than the state code. Many towns set the building permit threshold at 6 feet instead of 7, and some require zoning permits or zoning board review for all fence installations regardless of height.
The practical result: the state code's 7-foot threshold is the ceiling, not the floor. Your town's local bylaws determine what actually applies to your project. Lowell requires a building permit for fences over 6 feet. Plymouth follows the same 6-foot trigger. Marlborough requires permits for nearly all fence work. Always contact your town's building department as the first step.
For a broader look at how fence permit rules work across the country, see our national guide to fence permits.
Common Height Limits Across Massachusetts
Despite the variation between towns, the height limits across Massachusetts are remarkably consistent.
Front-yard fences are limited to 3.5–4 feet in most municipalities. Some towns are more specific — Lexington limits front-yard fences to 4 feet, while Needham and others use 3.5 feet. The restriction serves the same purpose everywhere: maintaining sight lines for drivers and preserving the open character of streetscapes.
Side-yard and rear-yard fences are typically allowed up to 6 feet. This is the standard across Boston, Worcester, Cambridge, Springfield, Lowell, and most other Massachusetts municipalities. A standard 6-foot cedar privacy fence in the backyard is the most common residential fence project in the state.
Fences over 6 feet trigger additional requirements in most towns. In communities that follow the state code directly, fences between 6 and 7 feet may be allowed without a building permit but may require a special permit or variance from the local Zoning Board of Appeals. Fences over 7 feet require a building permit under 780 CMR in all cases.
Corner lots face visibility triangle restrictions in every Massachusetts town. The typical rule limits fence height to 2.5–3.5 feet within a triangle measured 15–25 feet from the intersection of the two street property lines. This ensures drivers can see cross traffic when approaching the intersection.
Find your Massachusetts city
Get the exact fence permit requirements for your area.
The Spite Fence Law
Massachusetts has one of the most well-known spite fence laws in the country. Massachusetts General Laws Chapter 49, Section 21 provides that a fence is considered a spite fence if it:
- Unnecessarily exceeds 6 feet in height, AND
- Is maliciously erected or maintained for the purpose of annoying the owners or occupants of adjoining property
A spite fence is deemed a private nuisance under Massachusetts law, and the affected neighbor can sue for damages and seek a court order to remove or modify the fence.
The key legal elements are both the height (over 6 feet) and the intent (malicious). A legitimate 8-foot privacy fence built for a reasonable purpose — noise reduction, security, screening an unsightly view — is not a spite fence even if it annoys your neighbor. The law targets fences built with no purpose other than to cause harm.
Important context: Massachusetts property owners do not have a legal right to sunlight or a view. Even if your neighbor's fence blocks your sun or your sightline to the harbor, you can't take legal action unless you can prove malicious intent. Because proving intent is difficult, most spite fence claims are resolved through negotiation or mediation rather than litigation.
The spite fence law also applies to structures other than traditional fences — hedges, rows of trees, and other barriers that function as fences can be challenged under the same statute.
The Fence Viewer Tradition
Massachusetts retains one of the oldest fence dispute resolution systems in the country: the fence viewer. Authorized under Massachusetts General Laws Chapter 49, the fence viewer is a town-appointed official responsible for inspecting boundary fences and resolving disputes between neighbors.
Fence viewers can:
- Determine each property owner's responsibility for building and maintaining a boundary fence
- Assess damages resulting from fence neglect
- Specify the type and quality of fence required along a boundary line
- Mediate disputes about fence repairs, replacement, and cost sharing
The system dates to colonial Massachusetts, when boundary fences between agricultural properties were critical for containing livestock. While many towns no longer actively appoint fence viewers, the legal framework still exists and can be invoked when neighbors can't resolve fence disputes on their own. Some towns assign the fence viewer function to the building inspector or another municipal official.
Under Massachusetts law, a "lawful fence" is defined as a fence at least 4 feet high and in good repair, which may be constructed of rails, timber, boards, iron, stone, hedges, or other equivalent materials. This definition is primarily relevant to boundary fence disputes handled through the fence viewer system.
How Major Cities and Towns Differ
Boston
Boston has the most complex fence regulations in the state, reflecting its dense urban environment and numerous historic districts. The city's zoning code sets height limits that vary by neighborhood and zoning district. The general pattern follows the state standard — 4 feet in front yards, 6 feet in side and rear yards — but specific neighborhoods have additional rules.
Boston's historic districts add a significant layer of regulation. The city has dozens of designated districts, each overseen by a commission that reviews exterior changes including fence installation. The Aberdeen Architectural Conservation District in Brighton, for example, has regulations specifically intended to preserve original fences and stone walls and to discourage new fences. In these districts, you'll need a Certificate of Appropriateness before building, which requires that the fence design, materials, and height be compatible with the neighborhood's historic character.
Boston also has specific pool fence rules: if a pool is within 10 feet of a lot line, the barrier must be at least 6 feet tall and concealing — taller and more opaque than the standard 48-inch requirement under the state code. The city requires a Swimming Pool Affidavit confirming compliance with 105 CMR 435.00, the Massachusetts Sanitary Code.
Worcester and Springfield
Worcester and Springfield follow the standard Massachusetts pattern: 4 feet in the front yard, 6 feet in the side and rear yards, and building permits required for fences over 6–7 feet. Both cities have older, densely built neighborhoods where lot lines can be difficult to determine without a survey.
Springfield's zoning bylaws include provisions for fences in its several historic districts, where the design review process mirrors Boston's — the local historic commission reviews proposed fences for compatibility with the district's architectural character.
Cambridge
Cambridge is notable for its extremely dense residential neighborhoods and its extensive historic preservation requirements. The city has multiple neighborhood conservation districts and historic districts, each with its own design standards. Fence projects in these areas require review by the Cambridge Historical Commission.
Cambridge's zoning also interacts with the city's tree protection ordinance — if fence installation requires removing trees within 15 feet of the property line, a separate tree removal permit may be needed.
Lowell
Lowell requires a building permit for fences over 6 feet in height — stricter than the state's 7-foot threshold. Fences up to 6 feet can be placed on or close to the lot line without a building permit. The city also enforces visibility restrictions on corner lots: fences cannot obstruct driver sight lines near intersections.
Pool Fence Requirements
Massachusetts pool barrier requirements are set by the state building code (780 CMR) using provisions adopted from Appendix G of the International Residential Code. The key requirements:
- Pool barriers must be at least 48 inches (4 feet) tall, measured from the finished ground level
- No opening can allow a 4-inch sphere to pass through
- Gates must be self-closing and self-latching, opening outward away from the pool
- Gate latches less than 54 inches from the ground must be on the pool side, at least 3 inches below the top of the gate
- The fence must be non-climbable — no horizontal members that create footholds if the horizontal rails are less than 45 inches apart
- Chain link fence openings for pool barriers cannot exceed 1¾ inches
Any pool that can hold more than 24 inches of water requires a permit and a code-compliant barrier — this includes above-ground pools, portable pools, and even large inflatable pools. A building permit is required for the pool installation, and the barrier fence must be in place and inspected before the pool is filled.
Most towns require a Swimming Pool Enclosure Affidavit as part of the permit application, in which the homeowner certifies that the barrier will meet code requirements. The barrier is inspected as part of the final pool inspection.
Boston's additional requirement — a 6-foot concealing fence for pools within 10 feet of a lot line — is stricter than the state code and applies only within Boston city limits.
Material Restrictions
Massachusetts does not have extensive statewide material restrictions for fences, but the basics apply everywhere.
Barbed wire, razor wire, and concertina wire are prohibited on residential fences in most Massachusetts municipalities. The state doesn't have a single statute banning these materials, but virtually every town's zoning bylaw prohibits them in residential zones. Some rural communities allow barbed wire for agricultural purposes.
Electric fences are prohibited in residential areas in most towns. Where allowed for agricultural use, they must comply with state electrical safety requirements and include proper marking.
Massachusetts fences are subject to New England's harsh climate — freeze-thaw cycles, heavy snow loads, ice, and high winds. Fence posts should be set below the frost line, which in Massachusetts ranges from 36 to 48 inches depending on location. Posts set too shallow will heave during winter and lean by spring. Pressure-treated lumber rated for ground contact is the standard for posts, and cedar is the most popular choice for fence boards due to its natural resistance to rot.
Property Lines and Boundary Fences
Massachusetts law treats boundary fences — fences on the property line — as jointly owned by both property owners. Under Massachusetts General Laws Chapter 49, both neighbors share responsibility for maintaining a boundary fence. If one neighbor neglects their share, the other can invoke the fence viewer process to compel repairs.
However, there is no Massachusetts law requiring a neighbor to pay for a new fence on a shared property line unless both parties agree. If you want a fence and your neighbor doesn't, you're paying for it yourself.
Many towns recommend installing fences 2–3 feet inside your own property line. This avoids joint ownership issues, prevents encroachment disputes, and ensures you can maintain both sides of the fence without trespassing on your neighbor's land. Needham's bylaws specifically require that fences be entirely on the owner's property.
A property survey is not required by state law before building a fence, but it's strongly recommended — especially in older Massachusetts neighborhoods where lot lines may be irregular and property markers may be missing. Surveys in Massachusetts typically run $400–$800.
HOA Considerations
Massachusetts has a moderate HOA presence compared to Sun Belt states. HOAs are more common in newer suburban developments and condominium communities, particularly in the suburbs west and south of Boston.
Massachusetts does not have a state law limiting HOA authority over fences. If your HOA's governing documents restrict fence materials, styles, heights, or placement, those restrictions are generally enforceable. Common HOA restrictions in Massachusetts include prohibiting chain link fences, requiring specific wood stain colors, and mandating architectural review board approval before construction.
Condominium associations have particularly strong authority over exterior changes, including fences. In a condo community, you may not have the right to install a fence on what appears to be your property without the association's approval.
Setbacks, Easements, and Wetlands
Massachusetts has standard setback and easement rules, plus a New England-specific consideration: wetlands.
Easements restrict fence placement on many properties. Utility easements and drainage easements are common, and building a permanent fence within an easement without permission can result in forced removal.
Wetland restrictions are enforced through local Conservation Commissions under the Massachusetts Wetlands Protection Act. If your property is within a wetland buffer zone (typically 100 feet from a wetland, stream, or other resource area), you may need to file a Request for Determination of Applicability with your Conservation Commission before building a fence. Fence posts set in concrete within a buffer zone can trigger a full wetland hearing.
Several towns — including Lexington and Needham — specifically note that wetland restrictions apply to fence construction even when no building permit is required.
For an overview of all building permit requirements in Massachusetts — including decks, sheds, pools, and more — see our complete Massachusetts building permit guide.
Consequences of Building Without Required Permits
Building a fence without the required permits in Massachusetts can lead to enforcement actions that vary by town.
- Fines — some towns impose daily fines for ongoing violations. The amount varies by municipality.
- Stop-work orders — the building inspector can halt construction
- Mandatory removal or modification — if the fence exceeds height limits or violates setback rules
- Variance requirement — if your fence exceeds local limits, you'll need to apply to the Zoning Board of Appeals. Variances are not guaranteed, cost money, and take time.
- Neighbor appeals — even if your town's zoning department approves a fence, a neighbor can appeal the decision in court (Plymouth's bylaws specifically note this possibility)
- Sale complications — unpermitted fences can create issues during title searches and home sales
Most fence permit fees in Massachusetts are modest, and the process is straightforward for standard projects. The cost and hassle of correcting a non-compliant fence after the fact — which can include tearing it down and rebuilding — is far greater than getting the permit right from the start.
If you're also planning a deck or retaining wall alongside your fence, Massachusetts has separate permit requirements for each. Decks over a certain height and retaining walls over 4 feet typically require building permits with structural plans.
| City | Permit threshold | Typical fee | Review time |
|---|---|---|---|
| Boston | Varies | Varies | Varies |
| Worcester | Varies | Varies | Varies |
| Springfield | Varies | Varies | Varies |
| Cambridge | Varies | Varies | Varies |
| Lowell | Varies | Varies | Varies |
City names link to full city-specific guides.
Fence permits in neighboring states:
Ready to build your fence?
Professional fence plans that meet Massachusetts building code requirements. Permit-ready drawings you can submit with your application.
Frequently asked questions
What is the spite fence law in Massachusetts?
Massachusetts General Laws Chapter 49, Section 21 defines a spite fence as any fence that unnecessarily exceeds 6 feet in height and is maliciously erected or maintained for the purpose of annoying the owners or occupants of adjoining property. A spite fence is considered a private nuisance, and the affected neighbor can file a lawsuit seeking damages and removal or modification of the fence. The key legal test is proving malicious intent — you must show the fence was built specifically to cause harm, not for a legitimate purpose like privacy or security.
What is a fence viewer in Massachusetts?
A fence viewer is a town-appointed official who inspects and resolves disputes about boundary fences between neighbors. The position dates to colonial-era Massachusetts law and is still authorized under Massachusetts General Laws Chapter 49. Fence viewers can determine each neighbor's responsibility for building and maintaining shared boundary fences, assess damages from fence neglect, and set the type of fence required. While many towns no longer actively appoint fence viewers, the legal framework still exists, and some towns use it to mediate neighbor fence disputes.
Do I need a permit for a pool fence in Massachusetts?
Yes. Any swimming pool that can hold more than 24 inches of water requires a building permit, and a code-compliant barrier fence must be in place before the pool is filled. Under 780 CMR, pool fences must be at least 48 inches tall, non-climbable, and equipped with self-closing, self-latching gates. Boston has additional requirements — if a pool is within 10 feet of a lot line, the fence must be at least 6 feet tall and concealing. Most towns require a Swimming Pool Enclosure Affidavit as part of the permit application.
Can I build a fence on my property line in Massachusetts?
Yes, but with important caveats. Under Massachusetts law, a fence built directly on the property line is considered jointly owned by both neighbors, and both share responsibility for its maintenance. Many towns recommend installing fences 2–3 feet inside your own property line so you can maintain both sides without trespassing on your neighbor's land. There is no state law requiring you to get your neighbor's permission to build on the property line, but communication beforehand can prevent disputes. If disagreements arise, the town's fence viewer (where one exists) can be called to mediate.
Are there special fence rules in historic districts in Massachusetts?
Yes. Massachusetts has dozens of local historic districts, and properties within these districts are subject to review by the local Historic District Commission. Fence projects in historic districts typically require a Certificate of Appropriateness before construction, which means the commission reviews the design, materials, height, and style of the proposed fence. Boston's Aberdeen Architectural Conservation District, for example, has specific regulations aimed at preserving original fences and stone walls, and the city discourages new fences in the district. Check with your town's historic commission if you're unsure whether your property falls within a designated district.
Fence permits in Massachusetts cities
Select your city for specific fence permit rules, fees, and application details.
Permit requirements vary by city and county. The information in this guide provides general guidance for Massachusetts based on common local building codes. Always verify requirements with your local building department before starting your project.