Home › Massachusetts › Topics › Fences

Fences in Massachusetts: rules in 40 towns compared

How tall can my fence be, and where can I put it? Here's how each town answers it. Click a town for the details and the exact bylaw text.

Last reviewed

Quick answer: it depends on the town. Of the 40 Massachusetts towns we cover, 34 allow it outright, 1 allows it with a permit, 2 allow it with board review, 2 depend on the zone and 1 has no specific rule. Statewide rules apply everywhere; see the statewide rules section below.

Find your town in the table below for its exact rule.

This page is for Massachusetts homeowners planning a privacy fence, a boundary fence or a fence around a yard. Most fence rules are local, set in your town's zoning bylaw and sometimes in historic-district rules, but a few state laws apply everywhere. The State Building Code (780 CMR, 10th edition) doesn't require a building permit for a fence 7 feet high or less. Under M.G.L. c. 49, §21, a fence that unnecessarily exceeds 6 feet and is put up or kept maliciously to annoy a neighbor is a "spite fence" and a private nuisance. Pool fences must meet the state pool barrier rules, and fence work in a wetland or within 100 feet of one may need Conservation Commission review.

Of the 20 towns we cover for this topic, most set no general height limit for residential fences in their bylaws, including Belmont, Carlisle, Concord, Needham, Sudbury and Weston. Lexington caps fences at 6 feet along side and rear lines and 4 feet along the front, and Brookline allows 6 feet in the front yard and 7 feet in side and rear yards. In Weston and Hingham a fence over 6 feet (in Chatham, 6 feet or taller) counts as a structure that must meet building setbacks, and Lincoln requires a fence permit, plus Planning Board approval for taller fences, near a road or public land. Nearly every town keeps a sight triangle at street corners clear. Pick your town below for the details and the bylaw text.

Town-by-town comparison

TownVerdictShort answer
Wellesley
Norfolk Co.
AllowedWellesley's bylaws we reviewed set no general fence height limit or property-line setback for homes; this verdict rests on that silence, so confirm with the Building Department before building. The one townwide rule: at street corners, nothing that blocks sightlines may stand in a triangle measured 20 ft back from the intersection. Fences in a Historic District, the Flood Plain District or a Neighborhood Conservation District need extra approval.
Weston
Middlesex Co.
AllowedWeston's Zoning By-law sets no height limit for ordinary fences. A fence 6 ft or lower isn't treated as a "structure," so it can go on the property line. A fence over 6 ft counts as a structure and must meet building setbacks (20 to 45 ft from lot lines, depending on district). Near street corners, nothing over 24 inches is allowed in the sight triangle.
Lexington
Middlesex Co.
AllowedYes. Lexington's Zoning Bylaw lets you put a fence up to 6 feet high on or near a side or rear lot line, and up to 4 feet high on or near the front lot line, with posts allowed 6 inches above the fence. A taller fence inside a required yard must be set back from the lot line at least as far as it is tall.
Concord
Middlesex Co.
AllowedConcord's Zoning Bylaw doesn't cap residential fence height, and fences are exempt from yard setbacks, so they can generally go up to the lot line. On corner lots, nothing over 3 ft may stand within the 10-ft sight triangle at the intersection. Fences near wetlands may need Natural Resources Commission review.
Brookline
Norfolk Co.
AllowedUnder the version of Brookline's Zoning By-Law we reviewed (effective 2018), fences, hedges and walls up to 6 feet high may stand in the required front yard, and up to 7 feet in side and rear yards. Taller side or rear fences need a Board of Appeals special permit, and corner lots must keep a sight triangle clear.
Needham
Norfolk Co.
AllowedNeedham's bylaws we reviewed set no general height limit for residential fences, and fences are exempt from zoning setbacks, so they can go on the property line. The main local limits are a 25-foot sight triangle at street corners, where nothing may block drivers' view, and a special permit for fences in the Flood Plain District.
Sudbury
Middlesex Co.
AllowedSudbury's Zoning Bylaw lets you put fences and gates in any yard, including the front yard, with no setback from the property line. The 2023 bylaw we reviewed sets no specific fence height limit, so check with the Building Department before building a tall fence.
Wayland
Middlesex Co.
AllowedFences under 7 feet tall don't need a building permit in Wayland, and fences 6 feet or shorter are exempt from zoning setbacks, so they can go near the lot line. Keep the fence a reasonable distance inside your property line, and on corner lots follow the traffic-visibility rule in §198-702.4.
Lincoln
Middlesex Co.
Allowed with board reviewLincoln's zoning bylaw sets no general fence height limit, and fences along interior side and rear lines that don't border a road, public trail or town land aren't regulated by it at all. Any fence within 20 feet of a lot line along a public way, a public path or trail, or public land needs a fence permit from the Building Inspector. If that fence is over 3½ feet tall, it also needs Planning Board approval after a public hearing. Road-facing fences must be set back at least 10 feet from the edge of the road (5 feet from a sidewalk or bike path), and on corner lots nothing over 3 feet is allowed in the sight triangle.
Belmont
Middlesex Co.
AllowedBelmont's Zoning By-Law sets no general height limit or property-line setback for fences on a typical house lot, because fences aren't 'structures' under the by-law and are exempt from setbacks. The main limit is visibility: on corner lots and next to driveways and walkways, fences in the sight triangle can't block views between 3 and 8 feet high.
Andover
Essex Co.
AllowedThe Andover zoning text we reviewed (the 2022 recodified bylaw; it may have changed since) sets no general fence height limit or property-line setback, because fences aren't counted as 'structures'. On corner lots, keep anything between 3 and 8 feet tall out of the 25-foot sight triangle. Near wetlands, fences under 7 feet must stay at least 25 feet from the resource area unless the Conservation Commission allows otherwise.
Hingham
Plymouth Co.
AllowedHingham has no separate fence by-law. Under the Zoning By-Law, a fence or wall 6 feet or less in height isn't a "structure," so yard setbacks don't apply to it; a taller fence counts as a structure and must meet the district's setbacks. On corner lots, nothing between 2.5 and 8 feet high may block the view within the 15-foot sight triangle at the intersection.
Duxbury
Plymouth Co.
AllowedDuxbury's zoning bylaw doesn't mention fence height or fence setbacks for homes, so this answer rests on that silence, not on an explicit permission. On a corner lot, keep anything between 3.5 and 8 feet tall out of the 15-foot sight triangle at the intersection. Extra review applies in the Local Historic District, the flood hazard district and near wetlands.
Manchester-by-the-Sea
Essex Co.
AllowedManchester-by-the-Sea's Zoning By-law sets no fence height limit or property-line setback for homes, because fences aren't counted as 'structures'. Near wetlands, fencing is a permitted 'minor activity' in the buffer zone as long as it doesn't block wildlife movement. Pools must be enclosed by a fence at least 4 feet high.
Chatham
Barnstable Co.
AllowedChatham's zoning bylaw sets no general fence height limit. Fences under 6 feet can go up to the property line, but a fence 6 feet or taller must meet the building setbacks. On corner lots, nothing over 2½ feet can sit within the 25-foot sight triangle, and fences near wetlands or the shore need extra approvals.
Falmouth
Barnstable Co.
AllowedFalmouth's zoning bylaw (November 2022 version, which may have changed) sets no general fence height limit and says fences aren't "structures," so building setbacks don't apply to them. This answer rests on that silence. Near a driveway, nothing over 3 feet may sit in the clear sight triangle, and fences in a local historic district that are visible from a public way are treated as structures.
Scituate
Plymouth Co.
AllowedScituate's zoning bylaw sets no height limit or setback specifically for residential fences, and the Building Department says a permit is needed only for a fence higher than 7 feet. The town suggests setting your fence a foot or two inside your property line so you can maintain it without going onto your neighbor's land.
Swampscott
Essex Co.
AllowedSwampscott's bylaws don't set a fence height limit or any fence-specific rule for a typical home; this answer rests on that silence. The zoning bylaw only bans fences, walls and hedges on any lot that block drivers' view and create a traffic danger, such as at a corner, and because fences count as "structures" you should ask the Building Department whether yard setbacks apply. In the Frederick Law Olmsted Local Historic District, a fence visible from a public way needs approval from the Historic District Commission.
Hamilton
Essex Co.
Not specifically regulatedHamilton's bylaws don't set a fence height limit or fence setback for homes, and the zoning bylaw's definition of a yard expressly allows fences in required yards, so this answer rests on that silence. The main rule is corner clearance: on a corner lot, nothing between 3.5 and 8 feet high may stand within the 15-foot triangle at the street intersection. Pool fences must be at least 4 feet high.
Carlisle
Middlesex Co.
AllowedCarlisle has no fence bylaw, so there's no local height limit for side or rear fences. Zoning keeps any structure taller than 5 feet out of the front setback (40 feet from the street in residential districts); treating a fence as a "structure" is how we read the bylaw, so confirm with the Building Department. At street corners, nothing between 3 and 7 feet high may block visibility within 6 feet of the street lines and 20 feet of the intersection.
Plymouth
Plymouth Co.
Allowed with a permitIn Plymouth, a fence or wall in the required front yard can be up to 6 feet high and can't materially block drivers' view from the road; the zoning bylaw sets no side or rear height limit and lets fences stand within setbacks, up to the lot line. The bylaw counts anything 3 feet or taller as a structure (it calls a fence a "customary minor Structure") and requires a zoning permit for any new structure, so plan on a zoning permit for a fence 3 feet or taller and confirm with Inspectional Services.
Worcester
Worcester Co.
AllowedWorcester's zoning sets no fence-height limit for homes and has no corner sight-line rule for fences, and residential fences are exempt from site plan review; this page's "allowed" rests on that silence. A fence or wall over 6 feet counts as a "structure," and our interpretation (the ordinance doesn't say so outright) is that a taller fence would then have to meet accessory-structure rules: 5 feet from lot lines, 15 feet max, not in the front yard. Before building a fence along a street, confirm the street boundary with the Commissioner of Public Works and Parks.
Salem
Essex Co.
AllowedIn Salem's residential districts a fence can be up to 6 feet tall and may be built right on the property line; the zoning text we reviewed doesn't require a fence permit outside the Entrance Corridor and flood overlay districts. On corner lots, nothing over 3 feet is allowed in the 25-foot sight triangle, and in the Entrance Corridor and North River Canal Corridor districts front and side fences are limited to 4 feet.
Cambridge
Middlesex Co.
AllowedYes. Cambridge has no citywide fence height limit: its Zoning Ordinance allows fences in front, side and rear yards and doesn't cap their height outside a few overlay districts. In the Parkway Overlay (e.g. near Fresh Pond) and the Alewife Quadrangle, fences near the street can't exceed 4 feet or be more than 30% opaque, and chain-link is banned. Separately, the state building code requires a building permit for fences over 7 feet.
Dennis
Barnstable Co.
Depends on your zoneSouth of Route 6, a typical fence needs no zoning approval: Dennis's zoning bylaw sets no fence height limit or setback (fences aren't "structures" under it), and its only fence rule is a corner-lot sight triangle (nothing over 2½ feet above street grade within 20 feet of the intersection). North of Route 6 you're in the Old King's Highway Historic District, where every fence needs a certificate from the Dennis OKH Committee; wooden fences 4 feet or lower in listed styles can get a certificate of exemption without a hearing, and others need full review.
Burlington
Middlesex Co.
AllowedBurlington has no fence bylaw, and the zoning bylaw we have (through January 2025) sets no fence height limit, fence setback or corner sight-line rule for homes, so the "allowed" verdict rests on that silence. Whether zoning setbacks apply to fences isn't stated (a January 2026 setback amendment isn't in our copy), so confirm with the Building Department; near wetlands or in the floodplain, extra permits apply.
Yarmouth
Barnstable Co.
Depends on your zoneYarmouth's zoning bylaw sets no fence height limit and specifically excludes fences from its dimensional and setback rules, so outside the Old King's Highway Historic District zoning does not stop a typical residential fence at the lot line (state code requires a building permit only over 7 feet, and fences in flood zones need a town permit). Inside the Old King's Highway Historic District, every new or altered fence needs approval, fences are limited to 6 feet, fences over 4 feet are not allowed in front of the house, and vinyl is prohibited.
Medford
Middlesex Co.
AllowedYes, within height limits, though Medford's zoning has no fence section; the limits come from its yard rules. Fences under 4 feet may sit in the required front yard and in side yards within 15 feet of a street, and fences up to 6 feet in the rest of the required side yard; the ordinance sets no specific rear-yard fence height, and on corner lots nothing may block the 35-foot corner visibility triangle.
Gloucester
Essex Co.
AllowedGloucester's zoning doesn't set a fence height limit or a setback for ordinary fences: fences up to 6 feet aren't treated as structures, so they can go in yards and along lot lines. A fence over 6 feet counts as a structure under zoning, corner lots must keep a 25-foot sight triangle clear between 2.5 and 8 feet high, and a fence along a public street needs lines and grades from the City Engineer first.
Walpole
Norfolk Co.
AllowedFences are allowed in Walpole's setbacks, but a wall or solid fence can be no more than 3 feet high between the street and the required front setback line (30 feet back in residential districts), and no more than 6 feet anywhere else. A fence counts as "solid" if it blocks more than 25% of the view; the bylaw sets no height limit for open fences such as split rail, and it does not itself require a fence permit.
Acton
Middlesex Co.
AllowedActon's Zoning Bylaw lets walls and fences no more than 8 feet tall sit inside the required front, side and rear yards, so a typical fence can go right up to the property line. A fence taller than 8 feet must meet the district's setbacks like other structures. We found no local fence permit requirement.
Natick
Middlesex Co.
AllowedFences up to 6 feet are allowed. Anything taller needs a special permit. The fence must sit at least 1 foot inside your property line unless the abutter gives written permission, and the finished side must face the neighbor. On a corner lot, nothing within 15 feet of the intersection may be more than 3 feet high.
Westford
Middlesex Co.
AllowedYes. Westford's zoning bylaw exempts fences up to 6 feet tall from setbacks, so they can go up to the property line; on a corner lot nothing may block drivers' view of the intersection. The Building Department's checklist for fences of 6+ feet calls for a building permit application with a structural plan and a setback check, while the state code exempts fences up to 7 feet from a building permit, so confirm with the Building Department; town materials don't say whether a shorter fence needs a permit.
Canton
Norfolk Co.
AllowedCanton's zoning lets you put a fence or wall up to 7 feet tall on the property line, in front, side or rear yards; anything taller must be set back from the line at least as far as it is tall. The town's Building Division page says fences 6 feet or less need no building permit, but the current state code exempts fences up to 7 feet, so ask the Building Department about a 6-7 ft fence. On corner lots, nothing may block traffic visibility within the 25-foot corner triangle.
Sandwich
Barnstable Co.
Allowed with board reviewUnder Sandwich's zoning bylaw, a solid (sight-obstructing) fence or wall can be up to 3 feet tall in a required front yard and up to 6 feet in a required side or rear yard; taller needs a Zoning Board of Appeals special permit. If your home is north of Route 6 (the Old King's Highway Historic District), you also need a Historic District Committee certificate. Wood fences up to 4 feet in approved styles can get a $10 Certificate of Exemption without a hearing.
Wakefield
Middlesex Co.
AllowedWakefield's Zoning Bylaw has no general fence-height limit. In the front yard, a fence, wall or hedge within 5 feet of the front lot line can't be over 2½ feet tall unless you show it won't block drivers' views at driveways or corners, and any fence in the Floodplain Overlay needs a Zoning Board of Appeals special permit. We didn't review Wakefield's General Bylaws (posted only on eCode360), which could contain other fence rules.
Mashpee
Barnstable Co.
AllowedMashpee's bylaws don't set a general fence height limit; the zoning bylaw is silent on ordinary fences. The Building Department lists a permit for fences over 8 feet, but the state building code exempts only fences up to 7 feet, so ask the Building Department before building anything over 7 feet. On corner lots, nothing over 2.5 feet is allowed in the 20-foot sight triangle, and extra review applies in the Historic District and near wetlands.
Rockport
Essex Co.
AllowedOn most Rockport lots the zoning bylaw sets no fence height limit or fence permit, but on any lot between the coastline and the nearest public way fences can be no taller than 4 feet, and corner lots must keep a 30-foot sight triangle clear. A fence or wall over 7 feet counts as a structure and must meet setbacks, and in the four local historic districts new fences are capped at 42 inches along the street and 72 inches elsewhere and need Historical Commission approval.
Bourne
Barnstable Co.
AllowedFences 6 feet tall or less need no permit in Bourne and can go right on your property line, as long as they're entirely on your land. Taller fences must meet the setbacks for a building; the Building Department's Fence FAQ also says they need a Zoning Board of Appeals special permit, though in the bylaw that special-permit rule sits in the Downtown District section. On corner lots, nothing between 2.5 and 8 feet high may block the view within 20 feet of the corner.
Reading
Middlesex Co.
AllowedReading's zoning sets no maximum fence height and no setback. Fences are exempt from yard requirements and may go in the front yard. A building permit is needed for a tall fence, but town documents disagree on the cutoff: the zoning bylaw says over 6 feet, while the Building Division says 7 feet. Near wetlands, or in the Historic District, you need Conservation or Historic District Commission approval.

Massachusetts state rules on fences

Most fence rules in Massachusetts are local, set in your town's zoning bylaw and sometimes historic-district rules. A few state laws apply everywhere:

  • Building permit: the State Building Code (780 CMR, 10th edition) does not require a building permit for fences 7 feet high or less. Taller fences need one. Zoning height limits and setbacks still apply, and many towns cap fences at 6 feet.
  • Spite fences: under M.G.L. c. 49, §21, a fence that unnecessarily exceeds 6 feet and is maliciously put up or kept to annoy a neighbor is a private nuisance. The neighbor can sue for damages.
  • Fence viewers: every town must appoint fence viewers each year (c. 49, §1). Where adjoining owners both enclose and use their land, they share the upkeep of the partition fence equally unless they agree otherwise. If one side won't repair their share, the other can complain to the fence viewers, who can order the repair (c. 49, §§3–4). By statute, a "legal and sufficient" fence is 4 feet high and in good repair (c. 49, §2).
  • Pool fences must meet the state pool barrier rules (see Pools).
  • Wetlands: fence work in a wetland or within 100 feet of one may need Conservation Commission review.

State sources: M.G.L. c. 49, §21 (spite fences) · M.G.L. c. 49, §1 (fence viewers) · M.G.L. c. 49, §2 (legal and sufficient fences) · M.G.L. c. 49, §3 (partition fence maintenance) · M.G.L. c. 49, §4 (fence viewer proceedings) · 780 CMR 10th ed., Residential Chapter 1, R105.2 (work exempt from permit)

Common questions about fence rules in Massachusetts

Do you need a permit to put up a fence in Massachusetts?
Usually not for a typical fence. The State Building Code doesn't require a building permit for fences 7 feet high or less; taller fences need one. Your town's zoning height limits, setbacks and any historic-district or wetlands rules still apply, and a few towns require their own fence permit in some locations.
What is the maximum fence height in Massachusetts?
It depends on your town. There's no single statewide height limit: fences over 7 feet need a building permit, and towns set their own limits in their zoning bylaws. Many towns we cover set no general height limit, while others cap fences in front, side or rear yards.
What are the Massachusetts fence laws for the property line?
It depends on your town. Many bylaws we reviewed exempt fences, or fences up to a certain height, from yard setbacks, so they can go near the lot line. Some towns treat taller fences as structures that must meet setbacks. Corner lots usually have a sight triangle that must stay clear.
What is a spite fence in Massachusetts?
Under M.G.L. c. 49, §21, a fence that unnecessarily exceeds 6 feet and is maliciously put up or kept to annoy a neighbor is a private nuisance. The neighbor can sue for damages.
Who pays for a boundary fence between neighbors in Massachusetts?
It depends. Under c. 49, where adjoining owners both enclose and use their land, they share upkeep of the partition fence equally unless they agree otherwise. If one side won't repair their share, the other can complain to the town's fence viewers, who can order the repair.
What are the Massachusetts pool fence laws?
Yes, a pool needs a barrier. Pool fences must meet the state pool barrier rules in the building code, and some towns add their own pool-fence requirements. See our Pools page for details.

Other topics

ADU rules · Chicken laws · Short-term rentals · Shed permits · Burn permits & fire pits · Home businesses · Pool rules · Wetlands rules · Docks & piers