Mashhood Zafar, an official at the Abbasi Shaheed Hospital in Karachi, said at least two dozen had been injured in the fire, about half of whom had severe burns and were in serious condition.
Hours after the fire, survivors were seen desperately combing through the debris looking for friends and relatives.
Dr Saghir Ahmed, health minister for the southern Sindh province, said the gutted huts were home to about 200 people.
He said 15 children and 12 women were among those killed in the incident which occurred when most residents were asleep.
Karachi is Pakistan's largest city, but many of its residents are poor and live in crowded shanty settlements like the one hit by Thursday's fire.
|Desperate relatives combed through the
ruins looking for survivors [AFP]
Mohammed Ashgar, who lost his sister, brother-in-law and their seven children aged between one and 12, said they were planning to return to their home village in a few days.
"My eldest nephew had asked for a new toy car which I could not afford," he said. "I'll regret that forever."
Another survivor, Mohammed Khan, whose wife and two children were killed in the blaze, said it was "a catastrophe".
"I have lost everything. My life is destroyed."
Firefighters said many residents were trapped because the only escape route in the shanty town, which was surrounded on three sides by larger buildings, had been blocked by the flames.
"Most of the casualties seem to have been caused by the lack of exit route," Ehtesham Salaam, a fire official, said.
Police have launched an investigation to determine the exact cause of the fire, believed to be one of Pakistan's deadliest in recent years.