The tremor was recorded at 22:02 GMT on Friday, 147 kilometers (91 miles) north of the city of Hirara in the Okinawa prefecture. The epicenter was located at a depth of 153 kilometers.
There are no reports of casualties or damage caused by the earthquake. No tsunami alert has been declared.
Japan is located in a seismically active zone known colloquially as the Ring of Fire and regularly experiences powerful earthquakes. The March 2011 9.0 magnitude earthquake and following tsunami killed over 15,000 people and caused the Fukushima nuclear plant disaster.