At least seven people have died and dozens more were injured after a powerful earthquake struck southern Taiwan.

Rescue crews are searching for survivors after the 6.4-magnitude quake toppled a high-rise residential complex, leaving seven dead and an estimated two dozen missing.

A total of 247 survivors were pulled from the rubble in the worst-hit Tainan city, with 73 of those taken to hospital.

More than 1,200 firefighters scrambled with ladders, cranes and other equipment to the ruins of a 17-floor residential building that folded like an accordion after the powerful, shallow tremor.

Local media said the building included a care centre for newborns and mothers, with an infant among the dead in the disaster, which came two days ahead of the Lunar New Year celebrations.

Most people were still asleep when the quake struck at about 4am local time. It hit some 22 miles south-east of Yujing, and struck about six miles underground, according to the US Geological Survey.

The emergency response centre said seven people were killed, including a 10-day-old infant, a small child and at least two other residents inside the high-rise. One death was caused by falling objects. No details were immediately available for the two additional deaths.

As dawn broke, live Taiwanese TV showed survivors being brought from the high-rise, including an elderly woman in a neck brace and others wrapped in blankets.

The disaster response centre said 1,236 rescuers were deployed, including 840 from the army, along with six helicopters and 23 rescue dogs.