The explosion took place around 1000 GMT at a factory of Biocom Energia, which specialises in the production of biodiesel fuel.
It is located in Algemesi, around 30 kilometres (18 miles) south of Valencia, according to emergency services.
The victims of the blast were maintenance employees working at the factory, local authorities said without giving further details.
A fire also broke out at the site but it was brought under control by firefighters around 1200 GMT.
Police have opened an inquiry into what caused the explosion.