There were no immediate reports of damage or casualties from the quake, which hit 95 km (59 miles) southeast of the coastal town of Su-ao at a depth of 26 km (16 miles).
Su-ao is about 70 km (44 miles) away from the capital.
More about: Taiwan earthquake