- The fine print
- No CVC division creates a vehicle-habitation offense. CVC 22507 authorizes LOCAL parking restrictions by ordinance, which is why vehicle-dwelling rules in California are municipal (LA and many cities have their own). Local ordinances vary widely by city.
Parking overnight to sleep and camping are two different acts under most rules. Camping usually means setting up outside the vehicle: a tent, an awning, chairs, a fire. Staying inside a legally parked vehicle is often treated differently. Which one applies to you.
The posted sign and the officer on the ground beat this table. Rules change; the date above is when we last checked.
No California state law bans sleeping in your car. What the state does instead is delegate. Vehicle Code section 22507 authorizes cities and counties to restrict parking by local ordinance, which is why the rules change at every city line and why the honest answer to “is it legal in California” is “in which city?” We verified the Vehicle Code on 2026-07-17.
What state law says
No division of the California Vehicle Code creates a vehicle-habitation offense. That is the verified statewide answer, and it is worth being precise about because so many people assume California banned car sleeping outright. It did not. It built a machine for cities to do it themselves: CVC 22507 hands local governments the authority to restrict parking by ordinance, and vehicle-dwelling rules in California are municipal as a result. Los Angeles has its own and is the famous example, but many cities have written their own versions. Our table says “varies” because that is the verified structure of the law, not because we did not look.
Where people actually get in trouble
In California the main risk is exactly the thing the state authorized: local vehicle-habitation and overnight-parking ordinances, often street-by-street and hour-by-hour. That makes posted signs unusually important here, because the sign is frequently the only visible evidence of which ordinance covers that block. The sign wins over this page and over whatever an app told you. The other constant is private property: a lot belongs to its owner, permission is the rule, and a quiet night without it is still trespassing.
So where can you sleep tonight
Where the rules are written down once instead of 400 times. See California rest area rules for what is verified about overnight parking on state highway property, and free camping in California for the national forest and BLM options, where sleeping in your vehicle is ordinary dispersed camping and the stay limit is published. If you are weighing lots and truck stops, store parking explains how permission works there.
How to check locally
Search the municipal code of the specific city for “vehicle,” “habitation,” “lodging,” and “oversized vehicle,” because California ordinances come in several flavors. Then read the signs on the actual block, including the small print about hours. If a city’s code is ambiguous, assume it has a rule and park somewhere with a written yes instead. In a state with this many jurisdictions, the written yes is worth a detour.