Local code · San Francisco
San Francisco — Housing Code
The San Francisco Housing Code, explained in plain English with the controlling citations.
Last reviewed: July 6, 2026
Overview
San Francisco’s Housing Code is part of the City’s Building Inspection Commission Codes and sets minimum, enforceable standards for light, ventilation, sanitation, heat, safety, and ongoing maintenance in residential buildings, including apartment houses and residential hotels. It applies citywide, regardless of zoning, and is enforced by the Department of Building Inspection through inspections, notices, and licensing of certain properties. Land use and design topics are covered separately in the San Francisco Planning Code and related pages; this page focuses only on what the Housing Code itself requires.
Bottom line: Housing must be safe, sanitary, heated, and maintained. When conditions like mold, dampness, vermin, missing heat, or inadequate light/ventilation reach certain thresholds, a building is “substandard” and a public nuisance under § 1001, triggering enforcement and correction.
What the San Francisco Housing Code Covers
- Code status and purpose. The City adopts and enforces a Housing Code to protect life, health, safety, and welfare in residential buildings; it is a portion of the Municipal Code administered by the Department of Building Inspection. The Code’s purpose and scope expressly place responsibility for maintenance on the owner or the owner’s agent, and require all buildings (existing and new) be kept safe and sanitary (§ 101; § 102; § 103) .
- Applicability to existing buildings. Existing residential buildings must comply with the code version under which they were built and maintained, unless a retroactive provision applies; certain chapters (e.g., space, light and ventilation, sanitation, exits, fire safety) are explicitly retroactive (§ 104; § 206) .
- Key residential definitions. The Code defines “apartment house” as any building with three or more dwelling units (also including residential condominiums); “dwelling unit” includes living, eating, cooking, sanitation facilities; “congregate residence” includes dormitory-type settings but excludes hotels; these definitions determine which sections apply (§ 401) .
- Enforcement and nuisance. Buildings meeting “substandard” conditions—such as inadequate sanitation, heat, ventilation, lighting, room sizes, dampness, vermin, hazardous wiring, or dilapidation—are declared substandard and a nuisance, subject to orders, posted notices, and correction (§ 1001; § 205) . See Permits & Inspections for process.
Citywide Habitability and Maintenance Standards
- Space, light, and ventilation:
- Lack of minimum natural light and ventilation is a substandard condition (§ 1001(b)(8)) .
- Public corridors, hallways, and similar spaces in R-1/R-2 occupancies must be naturally ventilated with openable area ≥ 1/25 of the floor area (min 4 sq ft), or mechanically ventilated to specified rates (§ 1202.5) .
- Habitable rooms must be provided natural light per local amendment; structural projections over required openings are limited to 9 ft to protect daylighting (§ 1204; § 1204.2.2) .
- Sanitation and kitchens:
- Each dwelling unit must include a water closet, lavatory, and bathtub or shower within the unit (limited same-floor corridor exception); hotels may provide required private or specified shared facilities by guest-room count (§ 505(a)–(b)) .
- Every dwelling unit must have a kitchen with an approved sink and facilities for preparation, storage, and preservation of food; owner-provided appliances must be kept in good working order (§ 505(c)) .
- Hot water must be 105–120°F at the tap; minimum hot water storage is four gallons per hotel guest room and eight gallons per dwelling unit (§ 505(d)(3)–(5)) .
- Kitchens cannot be used for sleeping; kitchens/food rooms must be separated from water closet compartments; privacy is required for sanitary rooms (§ 505(e)–(f)) .
- All sanitary fixtures must be installed and maintained safely and per applicable codes (§ 505(g)) .
- Basements must be waterproofed/dampproofed where needed (§ 505(h)); drainage standards apply as referenced (§ 505(i)) .
- Heating and ventilation:
- Minimum heat in dwellings/guest rooms/congregate residences must maintain 70°F at 3 ft above floor in habitable rooms; installation and wiring must comply with City codes (§ 701(a)–(b)) .
- Hotels must provide heat capable of maintaining 68°F for a total of 13 hours daily during specified morning/evening windows (§ 701(c)) .
- In buildings where the heating system is not under the tenant’s control, a tamper-resistant temperature-sensing device and a timeclock must control heat, with specified placement and functionality (§ 701(d)) .
- Electrical and mechanical ventilation equipment must comply with the Electrical and Mechanical Codes (§ 701(e)–(f)) and weather protection is required (§ 703) .
- Dampness, mold, pests:
- Dampness of habitable rooms and infestation by insects, vermin, or rodents are substandard conditions (§ 1001(b)(11)–(12)) .
- Chronic or severe mold/mildew is an additional substandard condition (§ 1002(d)) .
- Structural and fire life-safety (existing apartment houses/hotels):
- Older wood-frame apartment houses/hotels have specific fire-resistance expectations by construction date; sprinklers may substitute for rated corridors in certain pre-1958 alterations; termite protection is required (§ 601) .
- Foundation ventilation is required for under-floor spaces to prevent moisture accumulation (§ 602) .
- Basement stairs in taller existing apartment houses/hotels must be enclosed; stair/exit width and handrail standards apply in older buildings (§ 802–§ 803) .
- Self-closing devices are required on hotel guest-room, community kitchen, and community toilet-room doors that open to corridors (§ 912) .
- Security and emergency egress features:
- Required exit doors (including security gates) must have an inside manual release operable without key/tools/special knowledge; security bars over required emergency rescue openings must have inside manual release (§ 706) .
- Identification of utility shutoff devices is required (§ 712) .
- Substandard building: enforcement triggers and examples:
- Inadequate or missing sanitation, kitchen sink, hot/cold water, heat, ventilation, natural light, room size, electrical illumination, or sewage connection; dampness; vermin; dilapidation; unsafe wiring; improper occupancy, and more (§ 1001(b)–(o)) .
- Additional substandard conditions include insufficient electrical outlets (§ 504 standard), lack of elevator service where required (§ 713), illegal conversion of residential hotel units, lack of hotel mail receptacles, lack of a usable telephone jack, missing grab bars in certain common facilities, and required hotel lobby notices about reporting violations (§ 1002(a)–(h)) .
Apartment Houses (Citywide Standards)
- Definition. An apartment house contains three or more dwelling units and includes residential condominiums (§ 401) .
- Core habitability. Must meet citywide heat (70°F), sanitation, kitchen, hot water, ventilation, lighting, and maintenance requirements noted above (§ 701; § 505; § 1202; § 1204; § 103) .
- Older construction. Fire-resistance/egress standards for existing buildings vary by construction date, with special rules for pre‑1923 and pre‑1947 buildings (§ 601; § 802–§ 803) .
- Annual licensing. Apartment houses are subject to residential code enforcement and license fees (e.g., 3–12 units: $542/yr; 13–30 units: $863/yr; >30 units: $1,066 plus add-on), per Table 1A‑P (current amounts as amended) . Verify current fee schedule on Permits & Forms.
Residential Hotels (Including SROs)
- Application. The Code regulates hotels, and sets additional rules for “residential hotels” that are also governed by Chapter 41 of the Administrative Code (e.g., to prevent illegal conversions) (§ 1002(c)) . See San Francisco Administrative Code and Tenant & Housing Programs.
- Heat and bathrooms. Hotels must supply heat capable of 68°F during specified morning/evening hours totaling 13 hours daily (§ 701(c)); required water closets, lavatories, and baths may be in-room or provided per-floor according to guest-room counts, with all-gender access and Title 24‑compliant signage (§ 505(b)) . See California Building Standards Code for signage standards.
- Hot water. Hotels must maintain 105–120°F hot water and four gallons of storage per guest room (§ 505(d)(3)–(4)) .
- Safety and operations. Self-closing guest-room and common-room doors to corridors are required (§ 912) . Lack of required elevator service is a substandard condition (§ 1002(b) referencing § 713) .
- Additional hotel requirements. Illegal conversion of residential units, lack of individual mail receptacles, or failure to post a 311 notice in the lobby are substandard (§ 1002(c), (e), (h)) .
- Annual licensing. Residential hotels are subject to hotel license fees (e.g., 6–29 rooms: $639/yr; 30–59: $956/yr; 60–149: $1,154/yr; higher tiers scale up) per Table 1A‑P (current amounts as amended) .
Selected Standards Table (Habitability and Operations)
| Requirement | Minimum/Rule | Applies To | Code Reference |
|---|---|---|---|
| Minimum dwelling heat | Maintain 70°F at 3 ft above floor in all habitable rooms | Dwellings, guest rooms, congregate residences | § 701(a) |
| Hotel heat schedule | Provide heat capable of 68°F for 13 hours (5–11 a.m., 3–10 p.m.) | Hotels | § 701(c) |
| Hot water temp | 105–120°F at tap | Apartment houses, hotels | § 505(d)(3) |
| Hot water storage | 8 gal per dwelling unit; 4 gal per hotel guest room | Apartment houses, hotels | § 505(d)(4) |
| In‑unit sanitation | Water closet, lavatory, bathtub/shower within unit (limited corridor exception) | Dwellings | § 505(a) |
| Hotel bathrooms (if shared) | Minimum number per floor by guest‑room count; all‑gender access/signage required | Hotels | § 505(b) |
| Kitchens in dwellings | Approved sink; facilities for food preparation/storage; appliances maintained | Dwellings | § 505(c) |
| Corridor ventilation | 1/25 openable exterior area (min 4 sq ft) or mechanical ventilation to specified rates | R‑1/R‑2 public corridors/halls | § 1202.5 |
| Self‑closing doors | Doors between hotel rooms/common kitchens/toilets and corridors must be self‑closing | Hotels | § 912 |
| Substandard triggers | Dampness; vermin/rodents; inadequate light/ventilation; missing heat; unsafe wiring | All residential buildings | § 1001(b)–(e) |
| Security releases | Exit doors and security bars must open from inside without key/tools | Dwellings, apartment houses, hotels | § 706 |
| Annual licensing | Apartment house and hotel license fees (schedule) | Apartment houses, residential hotels | Table 1A‑P |
Note: In older buildings, many requirements are retroactive; see the retroactive list (e.g., §§ 501–505, 701–707, 801–803, 901–912, 1001–1002) (§ 206) .
Practical Guidance and Cross‑Code Notes
- The Housing Code is enforced alongside the San Francisco Building Inspection Commission Code suite and California Building Standards Code. Where it references the Electrical, Mechanical, Plumbing, or Building Codes, install to those standards (§ 505(g); § 701(e)–(f)) .
- For plan review in multifamily corridors and lobbies, DBI’s Administrative Bulletin AB‑043 provides ventilation compliance guidance and examples (AB‑043, updated 2023; referencing § 504 and § 1001; SFBC § 1202) .
- Zoning and development standards (e.g., density, setbacks, height & bulk, conditional use) are not set by the Housing Code; see the zoning & planning overview.
- Adding or legalizing an ADU still requires compliance with Housing Code habitability (kitchen, bath, light/ventilation, and heat).
- Tenant protections and rent matters are governed separately by the Rent Ordinance and related pages; Housing Code enforcement may intersect with habitability claims.
Checklist
- Confirm the property’s residential type under definitions (e.g., apartment house, hotel, congregate residence) (§ 401) .
- Verify minimum heat can be maintained (70°F dwellings; hotel schedule 68°F) and controls meet § 701(d) where applicable (§ 701) .
- Provide required in‑unit or per‑floor sanitary facilities; ensure kitchens and fixtures meet material and installation rules (§ 505) .
- Ensure hot water delivery and storage capacity complies (§ 505(d)(3)–(4)) .
- Check natural light/ventilation for rooms and corridor ventilation per § 1202.5 (§ 1001(b)(8); § 1202; § 1204) .
- Address dampness, mold, and vermin promptly (substandard if chronic/severe) (§ 1001(b)(11)–(12); § 1002(d)) .
- In hotels, install self‑closing corridor doors and meet any elevator obligations (§ 912; § 1002(b) referencing § 713) .
- Confirm security devices (doors/gates/bars) have interior manual release (§ 706) .
- Maintain posted notices; do not remove DBI postings (§ 205) .
- Pay any required apartment house/hotel license fees (Table 1A‑P) and secure required permits; see Permits & Inspections and Applications & Forms .
Risks & Ambiguities
| Issue | Why it matters | What to verify |
|---|---|---|
| Retroactive requirements | Many provisions apply to existing buildings; missing them can trigger violations | Confirm which retroactive sections in § 206 apply to your building’s age and type |
| Corridor ventilation in older multifamily | Long interior corridors are common; insufficient ventilation is a substandard condition | Document compliance with § 1202.5; use AB‑043 for design options; involve Mechanical Engineer early |
| Hotel shared baths | Ratios and all‑gender signage are specific; noncompliance is common | Count guest rooms per floor and provide facilities/signage per § 505(b) and Title 24; coordinate with California Building Standards Code |
| Heat controls in master‑metered buildings | Tenants can’t access thermostats; controls must be tamper-resistant and time‑clocked | Verify device location, set points, and switches per § 701(d) |
| Mold/dampness thresholds | “Chronic or severe” mold is substandard; damp rooms also trigger violations | Inspect moisture sources; if in doubt, request DBI guidance; see § 1002(d) and § 1001(b)(11) |
| SRO/residential hotel conversions | Illegal conversion is a substandard condition tied to Admin Code Ch. 41 | Confirm status and records; ensure required lobby notice and mail receptacles (§ 1002(c), (e), (h)) |
| Security bars/exit gates | Improper devices can trap occupants | Confirm manual release as required in § 706; coordinate with San Francisco Fire Code where applicable |
Plain-English Summary
If you own or manage San Francisco housing, you must keep it warm, dry, ventilated, and sanitary, with working bathrooms, kitchens, and hot water. Hotels and apartment houses also have specific corridor, door, and licensing rules. Failing to provide minimum heat, light/ventilation, mold-free and pest-free conditions, or safe exits can make a building “substandard” and subject to enforcement until fixed.
Source References
- Housing Code title, purpose, scope, maintenance duty: § 101; § 102; § 103
- Application to existing buildings; retroactive provisions list: § 104; § 206
- Definitions (apartment house, dwelling unit, etc.): § 401
- Sanitation (dwellings/hotels), kitchens, fixtures, hot water: § 505 (incl. § 505(a)–(d))
- Habitable basement rooms: § 506
- Existing apartment house/hotel construction; foundation ventilation: § 601; § 602
- Heating/ventilation; weather protection: § 701; § 703
- Interior environment (ventilation; lighting daylight rule): § 1202.5; § 1204; § 1204.2.2
- Exits/stairs (older buildings): § 802; § 803
- Hotel self‑closing doors: § 912
- Substandard building conditions: § 1001; § 1002
- Posted notices; interference: § 205
- Apartment house/hotel license fees: Table 1A‑P (Residential Code Enforcement and License Fees)
- Administrative Bulletin AB‑043 (Ventilation of Public Spaces in Group R Occupancies) (link from code)
- Related topics: San Francisco Building Inspection Commission Code, Permits & Inspections, San Francisco Local Amendments, San Francisco Planning Code, California Building Standards Code, San Francisco ADUs, San Francisco Rent Ordinance
Sources
Retrieved passages
- CBC § 104 (Section 104) High relevance
- CPC § J109 (Section J109) High relevance
- San Francisco Zoning Code (chapter to) High relevance
- CBC § 601 (Chapter 6) High relevance
- CEC § 701 (Section 701) High relevance
- CRC § 110A (Section 110A) Medium relevance
- CEC § 401 (Chapter I) Medium relevance
- CPC § 505 (section 505) Medium relevance
Cited sections
- Housing Code title, purpose, scope, maintenance duty: § 101; § 102; § 103 (§ 101)
- Application to existing buildings; retroactive provisions list: § 104; § 206 (§ 104)
- Definitions (apartment house, dwelling unit, etc.): § 401 (§ 401)
- Sanitation (dwellings/hotels), kitchens, fixtures, hot water: § 505 (incl. § 505(a)–(d)) (§ 505)
- Habitable basement rooms: § 506 (§ 506)
- Existing apartment house/hotel construction; foundation ventilation: § 601; § 602 (§ 601)
- Heating/ventilation; weather protection: § 701; § 703 (§ 701)
- Interior environment (ventilation; lighting daylight rule): § 1202.5; § 1204; § 1204.2.2 (§ 1202.5)
- Exits/stairs (older buildings): § 802; § 803 (§ 802)
- Hotel self‑closing doors: § 912 (§ 912)
- Substandard building conditions: § 1001; § 1002 (§ 1001)
- Posted notices; interference: § 205 (§ 205)
- Apartment house/hotel license fees: Table 1A‑P (Residential Code Enforcement and License Fees)
- Administrative Bulletin AB‑043 (Ventilation of Public Spaces in Group R Occupancies) (link from code)
- Related topics: San Francisco Building Inspection Commission Code, Permits & Inspections, San Francisco Local Amendments, San Francisco Planning Code, California Building Standards Code, San Francisco ADUs, San Francisco Rent Ordinance
- SF Building Inspection Commissions Code.md
Frequently asked questions
What habitability issues most commonly make a San Francisco apartment “substandard”?
Common triggers include missing or inadequate heat, dampness in habitable rooms, vermin/rodent infestations, insufficient natural light or ventilation, lack of required bathrooms or kitchen sink, and unsafe wiring. These conditions are defined as substandard in § 1001(b)–(e) and are declared public nuisances subject to correction orders .
Do residential hotels have different heating rules than apartments?
Yes. Hotels must provide heat capable of 68°F for a total of 13 hours daily during morning and evening periods specified by the Code. Apartments and congregate residences must maintain 70°F at 3 ft above the floor in habitable rooms (§ 701(a), (c)) .
Can a hotel rely on shared bathrooms instead of private baths in every room?
Yes, but only if the number of per‑floor fixtures meets the Code’s table for guest‑room counts and the facilities are available to all residents regardless of gender with Title 24‑compliant signage. See § 505(b) for ratios and rules .
What does the Housing Code require for kitchen facilities in a dwelling unit?
Every dwelling unit must have a kitchen with an approved nonabsorbent sink and facilities for preparing, storing, and preserving food; owner‑provided appliances must be kept in good working order. Kitchens cannot be used for sleeping, and must be separated from water closet compartments (§ 505(c), (f)) .
Are landlords responsible for mold and mildew issues?
Yes. Chronic or severe mold/mildew is an “additional substandard condition,” and dampness in habitable rooms is also substandard. Landlords must abate sources of moisture and mold to maintain safe and sanitary conditions (§ 1002(d); § 1001(b)(11)) .
What ventilation is required in multifamily hallways?
Public corridors and similar spaces with openings into dwelling units must provide either natural ventilation of at least 1/25 of floor area (minimum 4 sq ft openable) or mechanical ventilation meeting specified rates. See § 1202.5; DBI AB‑043 offers design guidance .
Do apartment houses and residential hotels need an annual license?
Yes. Apartment houses and residential hotels pay annual license fees set in Table 1A‑P (amounts vary by unit/room count). Verify current fees when applying or renewing .
Are security bars over bedroom windows allowed?
Only if they have an approved interior manual release operable without keys/tools/special knowledge on openings required for emergency rescue. Similar manual release is required for exit doors and security gates (§ 706) .
Must hotel room doors be self‑closing?
Yes. Doors between hotel guest rooms or certain common rooms and the adjacent corridor must be equipped with an approved self‑closing device (§ 912) .
Who is responsible for ongoing building maintenance?
The owner or the owner’s designated agent is responsible for maintaining buildings and devices/safeguards in a safe, sanitary condition citywide. This duty is stated in the Code’s scope and maintenance provisions (§ 103) .
More in San Francisco code
Ask about any San Francisco property
Get a cited, plain-English answer on San Francisco zoning, setbacks, FAR, ADUs and permits — for any address.
Start Free TrialMore San Francisco zoning topics
San Francisco Planning Code
San Francisco Building Inspection Commission Code
San Francisco Permits & Inspections
San Francisco Local Amendments
San Francisco Fire Code
San Francisco Administrative Code
San Francisco Design Standards
San Francisco Rent Ordinance
San Francisco Permits & Forms
San Francisco overview