The fire broke out late on Sunday as the girls, aged five to 12, slept at the Christian school in the northern province of Chiang Rai. Investigators are looking at the possibility of faulty lighting on the floor below.
Charred wooden rafters opened to the sky at the Pitakiatwittaya School in the Wiang Pa Pao district of Chiang Rai.
"Most of the losses were because the children were asleep," said district police chief Colonel Prayad Singsin.
Two of five injured children were in critical condition, he said.
Forensic experts sifted through the debris and ashes inside the concrete shell of the building. Preliminary indications suggested a faulty fluorescent light on the ground floor may have been the cause, Sant Sukhavachana, a senior regional forensics officer, told Reuters.
A hot fragment fell on to a pile of clothes and started the fire, he said. The children likely died due to smoke inhalation.
"There was a lot of smoke and the room where it happened was right below where the children were sleeping," he said.
A total of 36 children of the 142 that attend the school were in the dormitory when the fire started, school head Pim Wasana told Reuters.
The alarm was raised by a school cleaner, she said.
"I am at a loss for words," she said. "I don't know what I should do, but the only thing on my mind now is to try to find a way to ease the parents' suffering."
Namae Patikiri, a 57-year-old member of the Hmong hill tribe, lost six grandchildren in the blaze.
"Five of them had only moved here a year ago," she said, crying. "The other one had only been here for two weeks."