Is It Legal to Sleep in Your Car in California? Laws, Restrictions, and Parking Rules
Sleeping in your car in California is not illegal under state law, but local city ordinances can restrict or ban it in specific areas. California repealed Penal Code Section 647(e), the old “vagrancy” statute once used to cite people for vehicle sleeping, so most restrictions now come from city parking rules, rest area time limits, and vehicle habitation ordinances rather than a single statewide ban.
Is Sleeping in Your Car Illegal Under California State Law?
California has no statewide law that makes sleeping in your car illegal. The state previously enforced Penal Code Section 647(e), which criminalized “lodging” in a place without permission, including vehicles.
That provision was repealed, removing the primary statewide tool used to cite people for sleeping in their cars.
This doesn’t mean you can park and sleep anywhere without consequence.
California overnight parking laws are set locally, which means your legal risk depends entirely on which city or county you’re parked in.
Where Can You Legally Sleep in Your Car in California?
Driving through California and need to find a legal spot to sleep in your car? Look no further. Listed below are the best legal options for sleeping in your car in California.
1. California Highway Rest Areas
According to California Code of Regulations Title 21, Section 2205, drivers may rest at Caltrans rest stops for a maximum of 8 hours. The rule was implemented in effort to reduce the number of accidents due to driver fatigue and makes rest areas one of the more reliable options to find legal overnight parking during a road trip.
2. Public Streets and Parking
Depending on local municipal code and signage, public streets and parking may also be a legal option. Make sure to read signage and check parking restrictions, before parking for the night.
3. Private Property With Permission
Sleeping on private property is generally legal, as long as you have permission from the owner. Not having permission can result in you getting citations for trespassing as well as any parking violations.
4. Safe Parking Programs
Additionally, the cities of Los Angeles and San Diego have safe parking programs that provide supervised and safe lots for people to stay in their vehicles overnight.
California City Laws about Sleeping in Your Car
Most of the laws that restrict people from sleeping in their cars in California are local city ordinances.
Los Angeles
Los Angeles Municipal Code Section 85.02 banned living in vehicles citywide. However, the Ninth Circuit Court of Appeals, in Desertrain v. City of Los Angeles, 754 F.3d 1147 (2014), ruled the ordinance was unconstitutional because it granted police the discretion to decide who to ticket. Currently, the city has refined its enforcement to target only specific locations.
San Francisco
The San Francisco Police Code Section 97 bans vehicle habitation in residential zones. The ordinance also requires compliance with posted signage.
San Diego
The San Diego Municipal Code, Section 86.0137(f), prohibits the use of vehicles as living quarters citywide.
San Mateo
The San Mateo Municipal Code, Section 10.04.140, bans vehicle habitation on public streets.
Sunnyvale
Sunnyvale has an ordinance that bans vehicle habitation on public streets between specific nighttime hours.
Can You Get a Ticket for Sleeping in Your Car in California?
You can be ticketed for sleeping in your car in California if you violate parking laws or vehicle habitation rules. The ticketing is for where you’re parked and for how long you’re parked.
Can You Get A DUI For Sleeping In Your Car?
It is possible to get a DUI for sleeping in your car, depending on the case. California Vehicle Code Section 23152 makes it illegal to drive under the influence of alcohol or drugs, and there are cases where courts found that sleeping in a parked car can be grounds for a DUI.
In the case of Mercer v. Department of Motor Vehicles, 53 Cal.3d 753 (1991), the California Supreme Court found that there was circumstantial evidence to suggest the person drove while under the influence of drugs, and therefore, justified a DUI-related suspension of a person’s driver’s license, even if they were found asleep rather than driving.
To minimize your risk of being charged with a DUI, it is suggested to turn your car’s engine off and to remove your keys from the ignition if you decide to sleep it off in your car.
Is It Legal To Live In Your Car In California?
It is illegal to live in your car in California, in the sense of long-term vehicle habitation. Unlike temporary vehicle habitation, there are many local ordinances which restrict long-term vehicle habitation.
The U.S. Supreme Court’s 2024 decision in City of Grants Pass v. Johnson, 603 U.S. ___ (2024), upheld the right of cities to enforce public camping bans against homeless individuals. In the aftermath of the Supreme Court’s decision, vehicle habitation bans in cities in California should also be constitutional.
Tips for Sleeping Safely and Legally in Your Car
- Check local ordinances first: Search the specific city’s municipal code before parking overnight.
- Use designated rest areas when driving long distances: Stay within the eight-hour Caltrans limit.
- Park in well-lit, permitted areas: Avoid residential streets with posted restrictions.
- Keep your keys out of the ignition: This reduces DUI-related risk if you’ve consumed alcohol.
- Look into safe parking programs: Los Angeles and San Diego offer supervised lots for overnight vehicle sleeping.
Frequently Asked Questions
Can you sleep overnight in your car in California?
Yes, in many locations, as long as you follow local parking signage and time limits. Some cities restrict or prohibit it in specific zones.
Can police ask you to move if you are sleeping in your car?
Yes. Officers can ask you to move if you’re violating a posted parking restriction, blocking traffic, or parked on private property without permission.
Is it legal to sleep in your car at Walmart in California?
It depends on the individual store’s policy and local city ordinances, since Walmart does not have a statewide policy covering all California locations.
Can you sleep in your car at a California rest stop?
Yes, Caltrans rest areas allow parking for up to eight hours under California Code of Regulations Title 21, Section 2205.
Can you get a ticket for sleeping in your car in California?
Yes, if you violate a local ordinance, overstay a posted time limit, or park somewhere restricted — not for sleeping itself.
Is it illegal to sleep in your car in Los Angeles?
Not automatically. The citywide ban was struck down in Desertrain v. City of Los Angeles (2014), though location-specific restrictions still apply.
