The quake struck at about 4:00 PM (1230 IST) at a depth of some 28 kilometres, the US Geological Survey said. There was no threat of a tsunami from the quake, the Japan Meteorological Agency said.
The crippled Fukushima Daiichi nuclear power plant, battered by a massive 2011 earthquake-generated tsunami and now undergoing decommissioning, has shown no irregularities in radiation levels, a spokesman for operator Tokyo Electric Power told AFP.
Japan sits at the junction of four tectonic plates and experiences a number of relatively violent quakes every year, but rigid building codes and their strict enforcement mean even strong tremors often do little damage.
But the massive undersea quake that hit in March 2011 sent a tsunami barrelling into Japan's northeast coast, leaving more than 18,000 people dead or missing, and sending three reactors into meltdown at the Fukushima nuclear plant.
Read More: Quake of 5.2 magnitude jolts Japan
In April, two strong earthquakes hit southern Japan's Kumamoto prefecture followed by more than 1,700 aftershocks, leaving 50 dead and causing widespread damage.