Legalizing an In-Law Unit in San Francisco
San Francisco has many ground-floor rooms, garage apartments and "rooms down" that were built without permits. The city offers more than one way to make such a unit legal, and the route you choose changes what you can do with it afterwards. This page sets out the routes, the rules that catch owners out, and what the city's permit records show.
The short answer
There are two main routes. The city's Unit Legalization Program is for units built before 2013 and waives several planning rules — but a unit legalized that way can never be sold separately. The ADU route, usually under the State Programme, has no 2013 cut-off and is what most owners in the record used.
- Every route requires the building code to be met: ceiling height, ventilation, light, fire safety and exits.
- A recent no-fault eviction can block the city programme.
- A unit that was under rent control before stays under it after.
- The record: 64 standalone ADU applications since 2023 describe legalizing an existing unit. The 39 issued took a median of 256 days — against 208 for other ADU permits.
Sources, as of November 2026: San Francisco Department of Building Inspection, "Legalize a unit in your home" (sf.gov step-by-step); SF Planning, "Dwelling Unit Legalization Program FAQ" (last updated May 10, 2026); SF Planning Code §§207.1, 207.2, 207.3 and 317 as cited there; AB 2533; San Francisco Building Permits dataset (DataSF, i98e-djp9), ADU-flagged permits filed on or after Jan 1, 2023, pulled Nov 4, 2026. City pages read November 19, 2026. This is not legal advice; if the unit is or was tenant-occupied, speak to a San Francisco landlord-tenant lawyer first. Counts and medians computed by ADU Build Works.
Route one
The city's Unit Legalization Program
The city created this programme in 2014 for owners who had converted unused space into a rentable unit without authorisation. It runs under Planning Code §207.3 and starts at the Department of Building Inspection.
Who can use it
- The unit was built before 2013.
- One unit per lot can be legalized under the programme.
- A California-licensed architect, contractor, or civil or structural engineer must assess it.
- The city counts a "unit" as "an independent space that someone is able to live in full-time, without having to walk through the main house."
What it waives. The unit must meet the Planning Code "except for density, rear yard, open space, the light and air requirements for exposure, and parking."
What it does not waive. "All Building Code requirements must be met, including ceiling height, proper ventilation, light, fire safety, and egress." The city notes that a pre-application meeting can establish whether equivalencies are available.
What it costs you later. Two restrictions stay with the property:
- "Legalized units are ineligible for subdivision, which means they cannot be sold individually."
- Merging the legalized unit back into the main home needs a Conditional Use Authorization — a Planning Commission decision at a public hearing.
Route two
Legalizing as an ADU
The city's own guidance says "there may be other options available to legalize the UDU, such as the State or Local Accessory Dwelling Unit (ADU) Program." If you are not eligible for the legalization programme, DBI tells owners to ask Planning about those other routes.
In practice this is the route most owners in the record took. Of the 64 legalization applications we found, 35 cite the state ADU programme or the state code by name. Seven cite the city's legalization ordinance. The rest do not say, or cite the city's local ADU ordinance.
Why an owner might choose the ADU route:
- No 2013 cut-off. A unit built in 2015 cannot use the city programme.
- Future sale. Only an ADU built under the State Programme, on an application submitted on or after May 1, 2025, on a lot with four units or fewer, can be considered for separate sale as a condominium. A unit legalized under §207.3 cannot.
- Rent control turns on the programme. A new ADU is subject to the Rent Ordinance if it is filed under the Local Programme, if it is added to a building that already has a rent-controlled unit, or if a waiver was requested.
And what the ADU route does not give you: the city programme's waivers of density, rear yard, open space, exposure and parking are specific to it. The State Programme has its own standards.
State law adds a further protection for unpermitted ADUs built before January 1, 2020: a health-and-safety standard for approval, and no impact fees or penalties. How San Francisco applies that to a given unit is a question for DBI and Planning.
The programme choice is explained in full at Will my SF ADU be rent controlled? and the sale rules at sell an SF ADU separately.
Side by side
The two routes compared
| Unit Legalization Program (§207.3) | ADU route, State Programme (§207.2) | |
|---|---|---|
| Unit must date from | Before 2013 | No cut-off in the city's guidance; state legalization protections apply to units built before Jan 1, 2020 |
| Units per lot | One | Per the ADU rules for the lot |
| Planning rules waived | Density, rear yard, open space, exposure, parking | The State Programme's own standards apply |
| Building code | Must be met in full | Must be met; state law sets a health-and-safety test for pre-2020 units |
| Blocked by past no-fault evictions | Yes | Not stated in the sources we read — ask Planning |
| Can be sold separately later | No | Possibly, if the condominium tests are met |
| Rent control | Stays if the unit was covered before | Depends on the building and the programme |
| Where it starts | DBI | Planning and DBI |
Neither column is "better." They answer different situations — and for many buildings, eligibility decides it before preference does.
The rules that catch owners out
Evictions, rent control and ceiling height
Past evictions can close the city programme
The legalization programme cannot be used for a unit that has had:
- an owner move-in eviction filed after March 13, 2014, if the notice was served within five years before the legalization permit application; or
- another no-fault eviction filed after March 13, 2014, if the notice was served within ten years before the application.
If the unit has been emptied of a tenant in the last decade, establish exactly how before you choose a route.
Rent control does not reset
"A dwelling unit that was subject to the Residential Rent Stabilization and Arbitration Ordinance prior to legalization shall remain subject to said Ordinance after legalization." Legalizing a unit does not change the rent-control status of a tenancy already in it.
A tenant's services are protected
If legalizing means reconfiguring a building with tenants — taking part of a garage, storage or laundry — those may be housing services under the Rent Ordinance. A law firm's published analysis of the 2025 amendments reports that removing one without just cause exposes the owner to treble damages. See garage to ADU in San Francisco.
Ceiling height is not waivable
Under every route. If the existing room does not meet the code's height, the options are physical, and expensive — two permits in our Noe Valley data describe lowering the floor. Have it measured first.
Removing a unit is harder than legalizing it
Owners sometimes ask whether they can simply take the kitchen out. Removing or merging a dwelling unit is governed by Planning Code §317, and merging a legalized unit requires a public hearing. Take advice before removing anything.
The process
The city programme, step by step
From DBI's own guide:
- Check eligibility with a licensed architect, contractor or engineer, who checks whether the unit is up to code. An initial screening with DBI staff is informal, non-binding and has no DBI fee.
- Optional pre-application meeting with DBI, Planning and Fire to settle code questions, including sprinklers. Cost: $348 to $2,162; standard meetings are two hours.
- Planning first. Submit a Project Application to the Planning Department and receive a Planning Approval Letter before applying for the building permit.
- Apply for a building permit with two sets of plans. The city states permit fees as "6 to 9% of building costs," half paid on application. A street-tree application is also required; the in-lieu fee is $2,193 per tree if you choose not to plant.
- Review by Planning, DBI and Fire. Planning issues a Notice of Special Restriction, which you notarise and record.
- Job card, construction and inspections.
- Certificate of Final Completion.
One piece of advice in the city's guide is easy to miss: "If you want to add more work beyond necessary improvement for legalization, you can apply for a separate building permit." Keeping the legalization permit to legalization is the simplest way to keep it moving.
The record
64 legalization applications since 2023
Among the 314 standalone ADU applications filed in San Francisco since January 1, 2023, the descriptions of 64 — one in five — say the project legalizes a unit that already exists.
Where they stand: 38 issued, of which 17 are recorded complete; 19 filed; 4 approved but not issued; 3 cancelled.
How long they took:
| Legalization permits | Other standalone ADU permits | |
|---|---|---|
| Permits with an issue date | 39 | 155 |
| Median days, filing to permit | 256 | 208 |
| Middle half | 187 to 436 days | 126 to 349 days |
| Issued within six months | 10 of 39 | 63 of 155 |
| Took more than a year | 15 of 39 | 35 of 155 |
Legalizations ran about seven weeks slower at the median, and nearly four in ten took more than a year. The quickest took 85 days; the slowest, 971.
Why they are filed. Twenty-five of the 64 descriptions mention a notice of violation — "to comply with NOV," "abate NOV." About four in ten of these owners were legalizing after the city had issued a notice. Owners who come forward on their own terms can do the feasibility work first; owners responding to a notice are on the city's timetable.
Where they are. District 11 (Excelsior, Outer Mission, Ingleside) has 15 of the 64; District 10 (Bayview, Visitacion Valley) 10; District 4 (Sunset/Parkside) 8; Districts 8 and 9, 7 each; Districts 1 and 2, 5 each. The south and west of the city account for most of them.
What they describe. "Legalize ground floor unauthorized dwelling unit." "Legalize existing 366 sq ft unit to new state ADU." "Legalize as-built unit on first floor." "Legalize an unpermitted dwelling unit at the basement level; structural strengthening." These are small, existing homes — the work is in kitchens, exits, fire separation and paperwork, not new construction.
Cost
What we can and cannot tell you
We publish no cost range for legalizing a unit in San Francisco, because we do not have one we can source. What the city itself states:
- Permit fees: 6 to 9% of building costs.
- Optional pre-application meeting: $348 to $2,162.
- Street-tree in-lieu fee, if you do not plant: $2,193 per tree.
- DBI's initial screening: no fee.
The construction cost depends on what the code assessment finds. Get that assessment, then get the corrections priced as a written scope by two or three contractors — our quote comparison worksheet and guide to vetting SF builders apply here as much as to a new unit.
Ready to start
The order to do it in
- Establish the facts: when the unit was built, whether it is or was rented, and any eviction history in the last ten years.
- If there is or was a tenant, see a landlord-tenant lawyer before anything else.
- Get a licensed professional's code assessment — ceiling height, exits, light and ventilation, fire separation.
- Choose the route with that professional: the city programme or the ADU route, knowing what each means for future sale and rent control.
- Use DBI's free screening and consider the pre-application meeting.
- Keep the permit to legalization. File other work separately.
Questions, answered
Legalizing an SF in-law unit: quick answers
Can I legalize an illegal in-law unit in San Francisco?
Usually, if it can meet the building code. The city's Unit Legalization Program covers units built before 2013, one per lot. Other units can often be legalized through the State or Local ADU programmes.
What is the difference between the legalization program and the ADU route?
The city programme waives density, rear yard, open space, exposure and parking rules, but the unit can never be sold separately. The State ADU route has its own standards and keeps a possible path to condominium sale.
Will my legalized unit be rent controlled?
If it was subject to the Rent Ordinance before legalization, it stays subject to it. For a unit legalized as a new ADU, it depends on the programme and the building.
Does a past eviction stop me legalizing?
It can. The city programme is unavailable after an owner move-in eviction with notice served in the previous five years, or another no-fault eviction with notice served in the previous ten.
My ceiling is too low. Is there a waiver?
No. Building-code requirements including ceiling height, ventilation, light, fire safety and egress must be met under the legalization programme.
How long does it take?
The 39 legalization permits issued on applications filed since 2023 took a median of 256 days. Fifteen took more than a year.
How much does it cost?
We do not publish a figure because we cannot source one. The city states permit fees at 6 to 9% of building costs.
Can I just remove the unit instead?
Removing or merging a dwelling unit is restricted under the Planning Code and can require a public hearing. Take advice first.
Keep going
Related San Francisco guides
San Francisco
Will my SF ADU be rent controlled?
The programme choice.
San Francisco
SF basement and lower-level conversion
Ceiling height and the other gates.
San Francisco
Garage to ADU in San Francisco
The tenant-parking trap.
San Francisco
How long an ADU permit takes in San Francisco
194 permits, analysed.
Check your lot
Start with what your lot allows
Type your address and tap twice. You get a plain-language verdict on screen — what your lot can likely take and the questions to settle first — before we ask for any contact details. Nothing you enter is shared with any builder. If you choose to save your brief, we store it and tell you so. No builders are signed to our roster yet, so no quotes are available today and no builder will contact you.
Check my lot
FREE · FAST VERDICTStep 1 of 2 — your address, what kind of home it is, and what you want to build. Two taps. That is enough for a first verdict; sharpen it afterwards only if you want to.
Stored and confirmed
Anything wrong in that summary? Email us at [email protected] and we'll correct the record.
We already have this brief from you
If something changed — a different project, a new budget — email us at [email protected] and we'll update the record. Your verdict itself is above, and it stays yours.
That didn't go through — nothing was sent
Your verdict is right here on this page, and it stays yours. Prefer to do this by email? Write to us at [email protected] with your address and what you'd like to build, and we'll set it up with you — no dead end.
Every type, answered — not just the one you picked
True cost — the planning band, the fees on record, and what the band leaves out
Not in the band — budget these separately; no honest source lets us put a number on them for your lot, so none is invented:
How long until someone can move in?
Dates that change this decision
What the permit record shows
What would change this answer
Lay your quotes side by side
Print this sheet and write each contractor's figures in a column. Every row is something a comparable bid has to state; a blank in a quote is a question for that contractor, not a saving. The first column is your brief, filled from your answers.
| Line every quote must state | Your brief | Quote A | Quote B | Quote C |
|---|
Check each contractor's licence number on the Contractors State License Board's public lookup (cslb.ca.gov) before you compare prices. Figures in your brief are the rule caps and planning estimates shown above, not bids.
Make your verdict more exact (optional)
Skip these — save my brief ↑San Francisco screening — two questions that decide an SF project
In San Francisco, space a tenant uses can be a protected “housing service” — it changes what’s allowed, so we ask now, not later. Why this matters →