Renovation Guide
How to Legalize an Illegal or Unpermitted Apartment in Massachusetts
8 min read
Plenty of Massachusetts houses have an apartment the town never approved. A basement unit, an attic unit, or a third unit in a two-family. Sometimes the last owner built it. Sometimes the buyer finds out after closing. The town can require it to be made legal or taken out. This guide walks through how legalizing one works, in the order it usually goes, from a contractor who is working through one right now.
The short answer
Many can be legalized. Three things decide it.
- Zoning: is a unit allowed on this lot at all.
- The building code: is the space safe, and does it meet code.
- The fire department: alarms, and sometimes sprinklers.
Zoning comes first, and it is the one people skip. If the town will not allow the unit, the building code does not matter.
A live example: a third unit in a Clinton two-family
A buyer bought a two-family in Clinton. The previous owner had finished a third unit without permits. The new owner asked us to legalize it. We met the building inspector. Here is what he told us:
- He needs existing plans or current as-built plans, completed, that show the conditions that are there today. That comes first.
- His main concerns are two means of egress, windows that qualify as emergency escape openings, and fire alarm systems.
- If those meet the criteria, we apply for a building permit and go from there.
Next is a meeting with the fire department. Sometimes the fire department asks for a sprinkler system when a building goes to three units. We do not know yet. We will update this guide as the job moves.
Step 1. Find out if the town allows the unit
The building inspector handles the code. Zoning decides whether a third unit is allowed on the lot. Ask the town:
- What district is the lot in?
- Is a unit like this allowed, and is it by right or by special permit?
- What lot size does it need? Many towns set a minimum lot size per unit.
- How many parking spaces per unit?
- Was the house a legal two-family to begin with?
A unit that was never permitted is not “grandfathered.” Only lawful pre-existing uses are protected. Many towns require a special permit for a third unit. Ask for the current bylaw, not an old copy, because bylaws change at Town Meeting.
Step 2. Get as-built plans
As-built plans are measured drawings of what exists today, not what someone intended. A licensed architect or engineer draws them. They show:
- Every room, labeled by use
- Ceiling heights, stairs and exits
- Window sizes and how high the sills are
- Where the kitchen, bathroom, heating, electric panel and meters are
- Where smoke and CO alarms are
- How the units are separated from each other
The inspector needs a baseline before he can tell you what has to change. The plans also show problems early, before you pay for a permit.
Step 3. The building inspector's checklist
Egress. Every unit needs a way out. In a basement or attic unit that usually means a door to the outside or a stair that leads out, plus an escape window or a second exit. A unit with one way out and no second option is the first thing that gets flagged.
Escape windows. The usual code numbers for an emergency escape opening: at least 5.7 square feet of clear opening (5 at grade floor), at least 24 inches high and 20 inches wide, a sill no higher than 44 inches above the floor, and it opens without keys or tools. Below grade it needs a window well. Windows that are too small can be enlarged or replaced. In a basement that often means cutting the foundation wall. Confirm the numbers with your inspector against the current code.
Fire alarms. In a building with three or more units, the state fire code asks for photoelectric smoke alarms on every level, in the basement, at the base of each stairway and outside each sleeping area. Smoke detectors in common areas are interconnected, with heat detectors in open porches, stairs and common areas. Common halls and basements are on primary power, not battery. CO alarms go on every level with sleeping areas and within 10 feet of each bedroom door. The fire department can require plans, a permit and a witnessed test.
Other things inspectors often check. Separation between units with fire-rated walls and ceilings, ceiling height, light and ventilation, the kitchen and bathroom, heat, and the electrical panel.
Step 4. Permits for work that is already done
- You need a building permit for the work. Starting work without a permit also lets the building official charge a fee on top of the normal permit fees.
- Electrical, plumbing and gas work done without permits needs permits from licensed tradespeople. They pull the permits and the work gets inspected.
- Expect the inspector to ask to see inside walls and ceilings in some places.
- If part of the space cannot meet today's code exactly, the code for existing buildings lets you propose an alternative that is equally safe. The building official has 30 days to respond. If he says no, you can appeal.
Step 5. The fire department and sprinklers
State law requires sprinklers in new or heavily rebuilt buildings with four or more dwelling units, in towns that accepted that law. Lodging houses with six or more unrelated people have their own rule. A three-unit building is under the four-unit line. Even so, the building official and the fire chief can still require sprinklers in a building going to three units.
The building code recognizes a smaller residential type of sprinkler system for buildings with no more than three units and under 12,000 square feet. If sprinklers come up, ask:
- Is a smaller residential system acceptable?
- Can the existing water service feed it, or does it need a larger one?
Ask early, because it can change the budget.
If the unit is inside a single-family house
Since February 2, 2025, Massachusetts lets an owner have one accessory dwelling unit (ADU) by right in a single-family zoning district. It can be up to 900 square feet or half of the main house's gross floor area, whichever is smaller. It can be inside the house, attached or detached. The town cannot require owner occupancy or a special permit for the use. It can still apply site plan review, setbacks, height limits and septic rules. The ADU needs a separate entrance, directly or through a shared hall that meets egress code.
That means an unpermitted in-law apartment in a single-family house may now have a clear path to be legal, if it fits the size limit and passes the building code. It still needs a building permit. Our ADU lot checklist covers the lot questions, and our in-law addition vs ADU guide covers the difference between the two.
The state ADU rules are written for single-family districts. If your property already has two legal units, like the Clinton house, do not assume the ADU law applies. Ask the town.
If the town says no
There are three outcomes:
- Legalize it as a unit, with the zoning approval and the code work above.
- Change it into something your zoning does allow, for example an accessory apartment where the bylaw has one.
- Take it out. That usually means a building permit to remove the second kitchen, licensed tradespeople pulling permits to cut and cap the plumbing, gas and electric, and bedrooms either removed or given proper egress. Then final inspections. Each town runs this a little differently.
What we do
We do not draw the plans or sign off on code. We bring in a licensed architect or engineer for the as-builts. We meet the inspector and the fire department on site. We price the work once the scope is in writing. We do the construction with licensed electricians and plumbers. We cannot promise an approval, because the town makes that call. See our ADU construction page.
Questions we get
Can I legalize an illegal apartment in Massachusetts?
Often, yes. It depends on three things: zoning, the building code and the fire department. Start with zoning.
What are as-built plans?
Measured drawings of what exists today, drawn by a licensed architect or engineer. The inspector uses them as the starting point.
Will I need sprinklers?
It depends on the building official and the fire chief. State law sets the sprinkler line at four units for new or heavily rebuilt buildings, but a building going to three units can still be asked for them. Ask early.
Do I need a permit for work that is already finished?
Yes. Expect permits from the building department and from licensed electricians and plumbers, and expect a fee on top of the normal permit fees for starting without a permit.
Does the state ADU law legalize my apartment?
It can help if the house is in a single-family district and the unit is within the size limit. It is not written for properties that already have two legal units.
What if the town says no?
You can change the space into something zoning allows, or take the unit out with permits.
Should I rent it while the permits are pending?
Ask your attorney and the building department first. Renting a unit the town has not approved can put you at risk.
Written by Syed Khan, Revive Built LLC, HIC #215151, CSL CS-121256. Last updated November 2026. General information, not legal advice. Your town makes the final call.
Keep reading
Related services
Have a project in mind?
Licensed, insured, and trusted by Worcester County homeowners and landlords.
(413) 559-1555