The epicenter of the earthquake, which struck around 8:16 a.m. (2316 GMT on Wednesday) was in Nagano prefecture, about 120 km (75 miles) from Tokyo, the Japan Meteorological Agency said.
No tsunami warning was issued after the quake, the agency said. The magnitude was revised down from a preliminary reading of 5.5.
Seven people were taken to hospital including those hurt from falling objects, but the injuries did not appear serious, an official at the local fire department said.
Japan accounts for about 20 percent of the world's earthquakes of magnitude 6 or greater.
On March 11, the northeast coast was struck by a magnitude 9 earthquake, the strongest quake in Japan on record, and a massive tsunami, which triggered the world's worst nuclear crisis in 25 years, at the Fukushima nuclear power plant. The disaster left up to 23,000 dead or missing.