The quake, which struck at 9:28 a.m., was centered near Briarwood Court in Los Altos, according to the U.S. Geological Survey.
Kathy Hobson, a resident on Briarwood Court, said nothing was damaged by the quake in her home or on the street.
"It was a loud bang," Hobson said. "My dog came and looked at me and said what's going on? The lights were swinging but nothing fell off anything."
Another resident on the street, who did not want to be named, said it "sounded like a freight train" when the quake hit.
"It shocked me out of my chair," she said.
The quake had a depth of 2.1 miles, according to the USGS.