The blast sent a cloud of ammonia into the air that spread over more than a kilometre. Ammonia, which is a highly irritating gas, is widely used as a refrigerant.
Witnesses said they heard a deafening explosion in the middle of the night before seeing thick smoke emerging from the factory.
Bang Lamung district chief Weekit Manarojkit said disaster prevention officials were immediately dispatched to evacuate employees and residents around the factory in Nong Prue subdistrict to safety.
A perimeter of about 2 km around the factory has been set to keep unauthorised personnel out, while those injured in the blast as well as those affected by chemical inhalation were rushed to nearby hospitals.
Officials said those who have inhaled the ammonia suffered from eye and nose irritation and some lost consciousness.
They said the situation was brought under control at around 4am with 128 injuries recorded.
Weekit added that district administration staff will patrol the area on Thursday to provide assistance to surrounding communities.