The shallow quake struck at a depth of 10 kilometres (six miles), the US Geological Survey said, just east of the coastal city of Yilan, 60 kilometres from Taipei. There were no immediate reports of damage.
Death toll from northern Pakistan earthquake rises to six
It comes after a 6.4-magnitude earthquake in February left 117 dead when an apartment complex collapsed in the southern city of Tainan.
That quake also raised questions over shoddy construction -- five people have been charged over the deadly building collapse.
AFP reporters in Taipei said Thursday's quake rocked high-rise blocks.
Earthquake jolts Lahore, other parts of Punjab
There were also reports by local media of power cuts and people trapped in lifts.
Taiwan lies near the junction of two tectonic plates and is regularly hit by earthquakes.
Five dead as 6.6-magnitude earthquake jolts parts of Punjab, K-P
A 6.3-magnitude quake that hit central Taiwan in June 2013 killed four people and caused widespread landslides.
The island's worst quake disaster came in September 1999 when a 7.6-magnitude earthquake killed around 2,400 people.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ