Customers and staff at a McDonald's in Melbourne's north were left coughing and with sore throats after pranksters threw a hazardous chemical powder into the drive-through window.

Emergency services were called to the Coburg restaurant just after midnight to treat 12 people who had been affected by the white powder.

The powder was later identified as non-toxic ammonium sulphate from an old dry powder fire extinguisher.

The Metropolitan Fire Brigade's Commander Darren Conlin says the prank cost emergency services time and resources.

"We've had over 25 firefighters here, Victoria Police, Ambulance Victoria, so it's tied up some significant resources for quite some considerable time for us to safely determine that there was no risk," he said.

"It's extremely irresponsible."

Dozens of firefighters helped to clean up the powder and staff have since returned to work.