The quake was felt from southern Oregon to the outskirts of San Francisco, but there were no immediate reports of injuries or damage.
Check out our live quake cam in the KABC-TV newsroom.
Geologists said the quake was relatively shallow, but there was no danger of a tsunami.
The temblor occurred in an area of the Pacific where two plates are sliding past each other in a horizontal motion, officials said.