The quake occurred at a depth of 39 kilometers. No one was reported killed or injured.
The quake comes a day after Typhoon Jebi, the strongest typhoon to hit Japan in at least 25 years, swept across the country's main island, damaging infrastructure and causing at least 11 deaths.
Japan is a seismically active region. In March 2011, a 9.0-magnitude offshore earthquake triggered a 46-foot tsunami that hit Japan's Fukushima nuclear power plant, leading to the leakage of radioactive materials and the shutdown of the plant. The accident is considered to be the world's worst nuclear disaster since Chernobyl.