Is it illegal to sleep in your car in California?
San Francisco, Sacramento and Redding each restrict sleeping in vehicles on their streets, at different hours and under different conditions, and Penal Code § 647(e) bars lodging in a vehicle or place without permission. What does each city’s code prohibit, and when does a shelter offer change the answer?
No California statute bans sleeping in a parked car outright. The state’s lodging law turns on permission from whoever controls the place [1], and San Francisco police say they may use it against people lodging in vehicles on city streets at night [2]. City codes set most of the rules for streets and public lots, and San Francisco, Sacramento and Redding all restrict sleeping or living in vehicles. We have not confirmed the current rule in Los Angeles.
What California state law says
The state statute closest to the question is the disorderly conduct section of the Penal Code, which makes it a misdemeanor for a person:
Who lodges in a building, structure, vehicle, or place, whether public or private, without the permission of the owner or person entitled to the possession or in control of it.
The section does not define “lodges” or say whether sleeping in your own car on a public street counts. It covers public and private places alike, and San Francisco’s police read lodging in a vehicle as “more than merely sleeping” [2]. Sleeping in a car on a store’s lot or other private property without the owner’s permission can fall under it.
State rest areas ban camping and stays over 8 hours in any 24 [8]. A first violation is an infraction, and a repeat is a misdemeanor [9]. Our rest-stop post compares other states.
City bans in San Francisco, Sacramento and Redding
All three cities ban some form of sleeping or living in a vehicle on public streets; Sacramento’s applies at any hour.
| City | Code section | What it prohibits | Hours |
|---|---|---|---|
| San Francisco | Police Code § 97(a) [3] | Using a house car, camper or trailer coach for human habitation, “including but not limited to sleeping”, on any street, park, beach, alley or public way in the city | 10 p.m. to 6 a.m. |
| San Francisco | Police Code § 97(b) [3] | Using any other motor vehicle for human habitation on streets and public ways in residential zones (R-H, R-M, R-C) | 10 p.m. to 6 a.m. |
| San Francisco | Transportation Code § 7.2.54 [4] | Parking a vehicle over 22 feet long or 7 feet tall, or an RV, camper or trailer, for more than two hours | Any time |
| Sacramento | City Code § 12.52.030 [5] | Camping or occupying camp facilities, which include vehicles, on any public property, and on private property with narrow exceptions; a misdemeanor | Any time, subject to Measure O on public property [6] |
| Redding | Municipal Code § 10.40.010(B) [7] | Sleeping in any vehicle on a public street, alley or parking area, or in a business’s customer lot without consent, when overnight shelter is available | 10 p.m. to 5 a.m. |
We read these code sections on October 5, 2026. Redding’s rule and San Francisco’s § 97(a) reach sleeping itself [7][3]. Sacramento’s ban covers anyone who will “camp, occupy camp facilities, or use camp paraphernalia”, and vehicles are camp facilities, so on the stricter reading it can reach a single night’s sleep in a vehicle [5]. Only San Francisco’s § 97(b) turns on living in the vehicle, as a “dwelling place” [3].
San Francisco: RVs, residential streets and police policy
Police Code § 97(b) defines “habitation” as “the use of a motor vehicle as a dwelling place”, and says it “shall not mean the use of a motor vehicle for allevation [sic] of sickness or temporary physical inability to operate such motor vehicle” [3]. Living in an ordinary car on a residential street at night is prohibited, but stopping because you are sick or temporarily unable to drive is not. The text does not settle an ordinary planned night of sleep, and § 97(b) does not reach an ordinary car outside residential zones [3].
The two-hour limit in Transportation Code § 7.2.54 applies at any hour to RVs, campers and trailers and to any vehicle over 22 feet long or 7 feet tall, so a high-roof van taller than 7 feet falls under it [4]. The exceptions are an SFMTA permit, a residential parking permit for that area, loading, and commercial vehicles covered by § 7.2.84 [4]. Since November 1, 2025, large vehicles parked over two hours “may be ticketed or towed” [10]. The Large Vehicle Refuge Permit exempts eligible RVs and trailers, but only for people who were living in a large vehicle in San Francisco on May 31, 2025 and whom the Department of Homelessness and Supportive Housing certifies as currently homeless and engaging in services [10].
SFPD General Order 9.07, a police policy effective July 17, 2024, tells officers not to stop or detain a driver solely for “a vehicle that has a person sleeping in the vehicle” under § 97, unless another city agency such as the MTA or Public Health asks, though officers may still cite parked cars [11]. Department Notice 24-126 (July 30, 2024, expiring July 31, 2027) says officers may cite § 647(e) or § 97, or both, when a person is lodging in a vehicle between 10 p.m. and 6 a.m. [2]. Its signs of lodging include an inoperable vehicle, cooking with open flames outside it, and a vehicle that has not moved in 72 hours [2].
Sacramento and Redding: when a shelter space counts
Sacramento’s Measure O (Ordinance 2022-0011, City Code § 12.100.030) says § 12.52.030 “may not be enforced against any individual on public property” until the city has offered the person an emergency shelter space and the person “has rejected the city’s offer” and “refuses to move from the public property” [6]. An offered space can be a spot of at least 150 square feet to park and sleep in a vehicle [6]. The offer rule does not cover § 12.100.040, which bans camping, including in a vehicle, in an “encampment”, defined as “four or more unrelated persons camping together or within 50 feet of each other and without permitted electrical power, permitted running water, and permitted bathroom facilities” [6]. Measure O is operative only while a city–county partnership agreement is in effect [6]. We did not confirm that it is, or that the 2022 text is unamended, so treat the offer condition as unconfirmed.
Redding’s ban applies when there is “available shelter”: a shelter with an open overnight space at no charge [7]. A space does not count as available when the shelter is full, when you have used up its stay limit, or when it requires religious observance. It does count as available when you cannot use it because of your own conduct, such as intoxication, drug use, unruly behavior or breaking shelter rules [7]. Redding’s camping ban on city property, including streets and parking lots, has the same condition [7]. Camping on private land other than your own needs the owner’s written consent, carried and shown to any officer who asks, for no more than seven consecutive days followed by at least seven days off [7].
Since the Supreme Court’s 2024 *Grants Pass* decision, the Ninth Circuit’s *Martin v. Boise* rule on shelter beds no longer limits California cities, so conditions like these are local choices [12]. Our national post on sleeping in your car covers that history.
Parking time limits and towing
Cities may restrict parking on certain streets at all or certain hours, and outside alleys the rule applies only once signs give notice [13]. State law lets them tow a vehicle left on a street for 72 or more consecutive hours in violation of a local ordinance that authorizes removal [14]. San Francisco bans leaving any vehicle on a public street for more than 72 consecutive hours [15]. Sacramento’s City Code lets police and parking staff remove any vehicle left on a street for 72 or more consecutive hours, whether or not anyone is sleeping in it [16].
Los Angeles: current rule unconfirmed
In 2014 a federal appeals court struck down Los Angeles’s old ban on using a vehicle “as living quarters either overnight, day-by-day, or otherwise” as unconstitutionally vague [17]. The 2016 replacement, Municipal Code § 85.02, allowed vehicle dwelling from 9 p.m. to 6 a.m. only on streets in non-residential zones, banned it at all times within 500 feet of licensed schools, pre-schools, day care facilities and parks, and was set to expire on July 1, 2018 unless extended [18]. We have not confirmed the current text of § 85.02, so ask the city through 311 which version applies before sleeping in a vehicle on a Los Angeles street.
Safe parking in Los Angeles and San Diego
Safe parking programs offer a lot to stay overnight, usually with restrooms, security and help finding housing [19][20]. San Francisco’s code exempts people licensed to sleep at a city Safe Overnight Parking Lot or Vehicle Navigation Triage Center from § 97 penalties [21], but we have not confirmed that any such site is open now, so the city is not listed below.
- Los Angeles (LAHSA): the Los Angeles Homeless Services Authority administers safe parking sites with onsite security and restrooms for people who lack “a fixed, regular, and adequate nighttime residence” and for people fleeing domestic violence. You apply through a service provider, and RV space varies by site; the LAHSA page lists current sites [19].
- City of Los Angeles: the City Attorney’s Safe Parking Program offers a place to park every night while using housing services. Its intake line is 323-210-3375, Monday through Saturday, 8:30 a.m. to 4 p.m. [22]
- San Diego: the city’s Safe Parking Program is run by Jewish Family Service of San Diego. Call 858-637-3373 to enroll; JFS keeps a waiting list when lots are full [20].
For a program in another county, or for a shelter bed tonight, dial 211 or search 211 California by location; it lists emergency housing, shelters and other local help [23].
Short stays on California’s national forests
Forest orders allow short camping stays on California’s national forests, and federal rules bar living there, as our national post explains. Los Padres National Forest allows 7 consecutive days and 21 days a year outside developed campgrounds [24], and Inyo National Forest 14 consecutive days within a 10-mile radius and 28 days a year [25]. Both orders were checked on October 12, 2026. Closures and day-use-only areas also apply, so check the forest’s alerts page or ranger district before you go. The stay limits guide covers the other California areas on this site. The dispersed camping near me tool gives the five national forests and grasslands closest to a ZIP code, and Nomad Field Guide’s map shows each researched area with its stay limit and source.
How current each city’s code is
American Legal Publishing hosts San Francisco’s and Sacramento’s codes, and Municode hosts Redding’s. Each code page shows the latest supplement it includes. Sacramento’s showed Supplement No. 4, July 2026, including an ordinance passed August 25, 2026, when we read it [5].
Sources
- Penal Code § 647: Disorderly conductCalifornia Legislative Information
- Department Notice 24-126: Enforcement of laws to address lodging, encampments on public streets, sidewalks, plazas, or other public or on private propertySan Francisco Police Department
- San Francisco Police Code Sec. 97: Use of vehicles for human habitation prohibitedAmerican Legal Publishing
- San Francisco Transportation Code Sec. 7.2.54: Large vehicle parking restrictionsAmerican Legal Publishing
- Sacramento City Code Chapter 12.52: CampingAmerican Legal Publishing
- Ordinance 2022-0011: Emergency Shelter and Enforcement Act of 2022 (Measure O)City of Sacramento
- Redding Municipal Code Chapter 10.40: Unlawful campingMunicode
- Cal. Code Regs. tit. 21, § 2205: General (safety roadside rest areas)Legal Information Institute, Cornell Law School
- Vehicle Code § 22520.6California Legislative Information
- Large Vehicle Refuge Permit ProgramCity and County of San Francisco
- General Order 9.07: Restricting the use of pretext stopsSan Francisco Police Department
- City of Grants Pass v. Johnson, No. 23-175 (2024)Supreme Court of the United States
- Vehicle Code § 22507California Legislative Information
- Vehicle Code § 22651: Removal of vehiclesCalifornia Legislative Information
- San Francisco Transportation Code Sec. 7.2.29: Parking prohibited for more than 72 hoursAmerican Legal Publishing
- Sacramento City Code § 10.36.080: Removal from street or immobilization of vehiclesAmerican Legal Publishing
- Desertrain v. City of Los Angeles, No. 11-56957 (2014)U.S. Court of Appeals for the Ninth Circuit
- Revised LAMC Section 85.02 effective January 7, 2017: Use of vehicles as living quartersCity of Los Angeles, City Administrative Officer
- LAHSA-administered Safe Parking sites in Los AngelesLos Angeles Homeless Services Authority
- Safe Parking ProgramCity of San Diego
- San Francisco Police Code Sec. 97.1: ExceptionsAmerican Legal Publishing
- Homelessness: Safe Parking ProgramOffice of the Los Angeles City Attorney
- 211 California211 California
- Occupancy and Use Forest OrderLos Padres National Forest
- Stay Limits, Parking, and Developed Recreation Site UseInyo National Forest