The quake struck near the uninhabited island of Torishima in the Pacific Ocean, about 600 kilometres (370 miles) south of Tokyo, and its epicentre was about 370 kilometres (230 miles) below the sea, the Meterological Agency said.
The agency said there was no danger of a tsunami.
Buildings in the Tokyo area shook but there were no immediate reports of damage or injuries. Express trains in northern and central Japan were suspended temporarily for safety checks but later resumed.
North-eastern Japan was devastated by a massive earthquake and tsunami on March 11 that left nearly 20,000 people dead or missing. Japan, which lies along the Pacific "Ring of Fire," is one of the world's most seismically active countries.
Get Breaking news, live coverage, and Latest News from India and around the world on NDTV.com. Catch all the Live TV action on NDTV 24x7 and NDTV India. Like us on Facebook or follow us on Twitter and Instagram for latest news and live news updates.