The quake was centred 14 km (nine miles) northeast of the coastal town of Su-ao, the U.S. Geological Survey said.
There were no immediate reports of injuries, collapsed buildings or other damage.
Earthquakes are common in Taiwan. In February, a 6.4 magnitude quake toppled a large apartment complex in southern Taiwan killing moer than 100 people. (Reporting by J.R. Wu; Editing by Nick Macfie)