Rescue workers spent hours on Thursday pulling children from the rubble of the privately run Al-Khair Education Centre, while panicked parents and relatives gathered outside the building seeking news of their loved ones.
Most of the students killed were under 13.
At least 45 people suffered major and minor injuries, said Arif Khattak, regional director of the Rescue Department.
Television footage showed rescuers clawing through debris with their bare hands and carrying bloodied children to waiting ambulances as relatives and residents crowded the narrow alley where the school stood.
A higher-floor roof collapsed onto students in classrooms below, crumpling two storeys of the building, a rescue official said.
"The fatalities include 12 girl students and a female teacher," Lady Reading Hospital spokesperson Mohammad Asim said.
Three children were in critical condition, with head injuries, Asim said, adding that most of the 20 injured brought to that hospital had been treated and sent home.
The incident took place in the morning and the rescue operation lasted for four to five hours, Khattak said.
"It was a weak building structure," Peshawar police chief Mian Saeed said.
"Its roof was overloaded with construction on a weak structure, which caused the collapse."
Saeed said the school's owner had been arrested and authorities had opened an investigation.
Distraught relatives accused the school of ignoring concerns about the building's condition and demanded accountability.
"Make an example of them, a lesson for all, so that no one dares open a school just to make money without providing facilities," said Mohammad Zaman, who lost two nephews in the collapse.
Earlier, police chief Saeed said he feared the death toll could rise as just 47 of the 110 students in three classrooms at the time had been rescued.
There was no immediate comment from school officials.
Prime Minister Shehbaz Sharif expressed sorrow over the tragedy and offered condolences to the victims' families, according to a statement from his office.