Tangerang police chief Hary Kurniawan said the death toll could rise further as many of the dozens of injured have extensive burns.
He said all 47 bodies recovered so far were found in the remains of the factory and a search was continuing.
The factory had been operating for less than two months, he said.
Indonesia's MetroTV, quoting a local official, said that although the factory had a permit, its proximity to a residential area was against regulations. Safety laws are often inconsistently enforced in Indonesia.
A Jakarta police official, Nico Afinda, said the bodies were found piled at the rear of the building.
The factory had more than 100 employees, according to Afinda.
More about: #Indonesia