A 5.1 magnitude earthquake struck 18 km (11 miles) off eastern Taiwan's Hualien city on Thursday, the island's weather administration said, with no immediate reports of damage.
The quake briefly shook buildings in the capital, Taipei. The quake had a depth of 31.6 km (19.6 miles), the weather administration said.
Taiwan lies near the junction of two tectonic plates and is prone to earthquakes.
More than 100 people were killed in a quake in southern Taiwan in 2016, while a 7.3 magnitude quake killed more than 2,000 people in 1999.