Marin fee waivers expire Dec 31, 2026 Two detached ADUs per lot from Jan 1, 2027 Check your lot before both clocks run

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.

Check this for your address — free

Type your address and tap twice. You see your verdict on screen before we ask for any contact details.

No phone number needed. No builders are signed to our roster yet — we tell you that before you save anything.

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 fromBefore 2013No cut-off in the city's guidance; state legalization protections apply to units built before Jan 1, 2020
Units per lotOnePer the ADU rules for the lot
Planning rules waivedDensity, rear yard, open space, exposure, parkingThe State Programme's own standards apply
Building codeMust be met in fullMust be met; state law sets a health-and-safety test for pre-2020 units
Blocked by past no-fault evictionsYesNot stated in the sources we read — ask Planning
Can be sold separately laterNoPossibly, if the condominium tests are met
Rent controlStays if the unit was covered beforeDepends on the building and the programme
Where it startsDBIPlanning 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:

  1. 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.
  2. 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.
  3. Planning first. Submit a Project Application to the Planning Department and receive a Planning Approval Letter before applying for the building permit.
  4. 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.
  5. Review by Planning, DBI and Fire. Planning issues a Notice of Special Restriction, which you notarise and record.
  6. Job card, construction and inspections.
  7. 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 permitsOther standalone ADU permits
Permits with an issue date39155
Median days, filing to permit256208
Middle half187 to 436 days126 to 349 days
Issued within six months10 of 3963 of 155
Took more than a year15 of 3935 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

  1. Establish the facts: when the unit was built, whether it is or was rented, and any eviction history in the last ten years.
  2. If there is or was a tenant, see a landlord-tenant lawyer before anything else.
  3. Get a licensed professional's code assessment — ceiling height, exits, light and ventilation, fire separation.
  4. Choose the route with that professional: the city programme or the ADU route, knowing what each means for future sale and rent control.
  5. Use DBI's free screening and consider the pre-application meeting.
  6. 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.

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 VERDICT

Step 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.

Your address is looked up with the US Census geocoder and FEMA flood maps to find your jurisdiction. Nothing about you is stored unless you choose to store your brief after your verdict. Privacy

Sizes in the fast verdict are rule caps for your town. Tell us your lot size afterwards, in “Sharpen your verdict”, and we'll check what your lot can actually hold.

ADU Build Works · Lot planSheet A-1 · Your verdict

Fast verdict — preliminary

Your lot looks workable.

    Confidence: preliminary — inferred from your address and answers, not yet confirmed by a site check or a municipal record pull. Nothing here is a permit approval or a guarantee.

    Save your brief

    Four quick things: your name, how to reach you, whether the home is yours, and your OK to contact you. Nothing is stored until you tap the button. Your verdict stays on this page either way — the full plan is just below.

    Roster status, plainly: our founding roster is enrolling and no contractors are signed yet. Early projects are first in line for matching when seats fill — you may then receive up to 2–3 comparable quotes and choose. No quotes are available today, and we will not pretend otherwise.

    View rules: The 2027 view re-reads every row under the rules that start Jan 1, 2027 — rows that change are badged.

    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 stateYour briefQuote AQuote BQuote 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)

        All of these are optional. Answer any you know and your verdict above updates straight away. You can skip every one of them.

        Skip these — save my brief ↑

        Check my lot — free