The quake hit at around 11:12 a.m. It had a depth of 5.8 miles, the USGS said.
It was felt in Oakland, Richmond, El Sobrante, Richmond and San Francisco.
The San Francisco Municipal Transportation Agency said for Muni passengers to expect minor delays as it is conducting visual safety checks.