The factory is located on the Fuente del Jarro industrial estate in Paterna, near Valencia.
It is believed that the part of the factory where the explosion occurred, shortly after 9.30am local time (8.30 GMT), is the area where chlorine is manufactured.
It is not known yet whether any employees were inside the building at the time of the incident.
Local police have blocked off access to the factory and are currently deciding whether to evacuate the rest of the buildings.
Witnesses heard several different explosions around the time of the incident and it has been reported that plumes of smoke are visible over a mile away.
Seven fire engines have been dispatched to the scene from the Paterna, Burjassot and Catarroja Fire Departments.
Two ambulances have also reportedly been sent to assist.