Cadbury had launched an internal investigation into an ammonia leak which caused a factory evacuation and several central Dunedin streets to be shutdown.

Hundreds of workers were evacuated from the Cadbury factory and neighbouring businesses after the incident at 1.17pm on Monday.

A spokeswoman for the company, Celin Huseby of Mondelez Australia Pty Ltd, confirmed it had reported the leak of ammonia, which was used as a cleaning agent within the plant.

HAMISH MCNEILLY/FAIRFAX NZ The smell of ammonia has been reported downwind from Dunedin's Cadbury factory.

The company was "conducting an internal investigation to ascertain the cause of the leak".

"We can confirm that all employees were immediately evacuated, and that all are safe and uninjured."

Stephanie De Vere, of Christchurch, was on a Cadbury World tour with a friend and five children when the alarm went off.

HAMISH MCNEILLY/FAIRFAX NZ Firefighters wearing hazmat suits have entered the Cadbury chocolate factory in Dunedin.

"There was a strong smell of ammonia," she said.

A person in their group was in the courtyard when he saw ammonia coming out in "gusts".

"I said it was ammonia and then the tour guide moved us away."

HAMISH MCNEILLY/FAIRFAX NZ The Fire Service and ambulance crews are at the scene.

The group had waited more than two hours outside the cordon, but could not leave as their personal items remained in the cordoned-off building.

"We are hoping for some free chocolate after this."

Outside the factory, firefighters in hazmat suits were sprayed in temporary decontamination showers.

Dunedin senior station officer Jason Hill said firefighters wearing oxygen tanks had entered the factory to find and isolate the leak.

On arrival they saw an "ammonia cloud" in the factory courtyard.

"The wind was causing an ammonia cloud to disperse up in the air but the nature of the factory allowed us to it be contained in the courtyard, but there was small amounts coming out onto the one way system.

Cumberland and Castle streets were cordoned off, with Cumberland reopening at 3.30pm and Castle St reopening at 4.15pm.

The area was cordoned off because ammonia had been drifting across the one-way system, Hill said.

Hill said he believed the leak had been caused by a pipe failing.

Firefighters and a contracting engineer used natural and mechanical ventilation "to clear the area".

Firefighters and Cadbury workers used detection equipment to ensure workplace exposure levels to ammonia were "sufficiently safe for all the workers to go back in".

Ammonia was attracted to moisture, such as sweat, and could cause skin irritation.

"Obviously we don't want to be breathing ammonia at all, so full encapsulated chemical protection clothing is required," he said.