Starting at 8 p.m. on Dec. 31 until 5 a.m. on New Year's Day, SamTrans will let people ride for free on all bus lines.
Caltrain is following suit, and will have extra trains leaving San Francisco at 12:45 a.m., 1:15 a.m., 1:45 a.m. and 2:15 a.m., or when full, that will make all regular local stops.
RediWheels, the county's paratransit service provider, will also offer free rides between 8 p.m. and midnight.
On Jan. 1, both SamTrans and Caltrain will operate on a Sunday schedule and you'll have to buy tickets as usual, according to the transit agency.
Call 1-800-660-4287 for more information and schedules, or go to the SamTrans website.