The quake had a depth of 27.5km (17.1miles) with its epicentre off Taiwan’s east coast, roughly halfway between the coast of Hualien county and the southern Japanese island of Yonaguni, the weather bureau said.
Taiwan, which lies near the junction of two tectonic plates, felt the quake across the island.
The Japan Meteorological Agency said that while the quake struck 20 km below sea level, there may be small swelling of the water but no imminent danger of a tsunami.
Taiwan was struck with 6.7 magnitude earthquake earlier in March, rattling buildings, leaving one injured and leading to the collapse of a half-constructed bridge.
While in January this year, the island state was hit by a 6.2 magnitude quake, centred 28.7 km below the ocean east of Hualien city on the island’s east coast. More than 100 people were killed in a quake in 2016, while about 2,000 people died in 1999 when a quake of 7.3 magnitude hit Taiwan.
Additional reporting from the wires