Police pulled 32 bodies, most of them charred remains, from the warehouse in Pallipat near Chennai, the capital of the southern Indian state of Tamil Nadu, PTI quoted local administrator Palani Kumar as saying.
Three people have been hospitalized with burns, Kumar said.
The cause of the fire was not immediately known and police officers could not be immediately reached for comment.
Police have arrested two people, including the warehouse owner, as they investigate, PTI said.
Several big cities and small towns of India have illegal factories making fireworks, which are used during festivals, weddings and religious ceremonies. Some illegal workshops operate in homes.
Nearly all the clandestine factories have minimal safety standards, and fatal explosions are a regular occurrence.