When California legalized marijuana, it also meant that people with convictions could petition to have their records expunged. Starting today, both San Francisco and San Diego will automatically erase misdemeanor convictions, free of charge. Prosecutors will also review felony charges and reduce them to misdemeanors as they see fit.

The process of applying for expungement isn’t straightforward—or cheap. “A lot of people don’t even know they qualify, and I don’t think it’s the right thing to do to make people pay lawyers’ fees and jump through a bunch of hoops to get something they should be getting anyway,” George Gascón, San Francisco’s district attorney, told the New York Times. But California is leading the charge, as the Times points out:

Other places have taken the opposite tack. In Nevada, Gov. Brian Sandoval vetoed legislation last year that would have allowed people convicted of possessing one ounce or less of marijuana to have their convictions vacated, even though that is no longer a criminal offense.

And in Colorado, it took five years after voters approved recreational marijuana use before the state passed legislation last year that allows people with pot convictions to apply to have their records cleared.

The result has been legal limbo: People whose behavior would not now be considered illegal are sometimes unable to find work, get college loans, obtain professional licenses, or find decent housing because of the blot on their record.

In San Francisco alone, more than 3,000 convictions will be cleared, and 4,900 felonies could be reduced to misdemeanors. San Diego will be…