Many of the charred corpses of victims were found clustered at the back of the factory in an industrial complex in Tangerang, police said, indicating there may have been a panicked rush to flee the flames.
"We are still evacuating victims... there are 46 body bags. The evacuation is ongoing," Harry Kurniawan, Tangerang Kota police chief, told AFP.
The police revised the death toll down to 46 from their earlier figure of 47, but said about 10 people remained unaccounted for.
A firefighter at the scene said the victims had been burned beyond recognition.
"Those who died are completely unrecognisable, totally burnt," Oni Sahroni told Metro TV.
Parts of the building collapsed after being gutted by the blaze, which scorched nearby cars and motorbikes. Witnesses reported hearing blasts erupt from the site.
Local resident Beni Benteng told AFP said he heard an explosion and people inside screaming for help.
Seven dead in India firework factory blast
"My friends and I and some police officers knocked down a wall so people could escape, then the workers came out," he said.
"I saw people including women were jumping from above, oh my God," he added.
The blaze, which broke out in the morning, was brought under control by late afternoon and authorities were working to recover the victims' bodies from the building.
Authorities have not yet said how the fire started, but have confirmed it began near the front door and quickly spread.
"Victims were found piling at the back, it seems like they were avoiding the blaze at the front door," Afinta told Metro TV.
Desperate friends and family thronged a nearby police hospital in Kramat Jati looking for loved ones.
Some relatives wept openly outside the hospital as victims, covered in bandages, were laid out in stretchers, while others with minor injuries sat in the hospital's hallways or outside.
A factory worker at the hospital in Kramat Jati said the fire erupted in the middle of production.
"I don't know how it happened, I was working outside of the factory and there were some explosions, four cars exploded and almost all motorbikes also exploded," Ade, who suffered burns to his arms and legs, told AFP.
The factory -- part of a complex that borders a residential area -- had only been operating for six weeks, district government official Toni Rustoni told Metro TV.
Some relatives of victims have already begun demanding action from the company.
Diana, whose 15-year-old sister was seriously injured in the fire, said the company, Panca Buana Cahaya Sukses, must not ignore the victims.
"Don't neglect her -- the insurance, the treatment, they must pay for everything," she told Metro TV through tears.
Deadly fires are not uncommon in Indonesia due to poor safety standards that are routinely flouted.
Seventeen people killed when a fire ripped through a karaoke bar on Sulawesi island in 2015.
In 2009, a fire killed 20 people at a karaoke bar in Medan, on Sumatra island.
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