Tonnes of bricks could again rain down on a Sydney street amid concern more parts of a charred seven-storey building might collapse.

More than 120 firefighters from 30 fire trucks battled the blaze which broke out at a heritage-listed former hat factory in Surry Hills on Thursday afternoon, consuming the building as thousands of people watched on.

Firefighters worked through the night to extinguish the blaze and are using a drone to monitor hot spots for potential reignition.

There are concerns at least building walls could still collapse without warning.

"There are two walls that are in a precarious position," Fire and Rescue NSW Superintendent Adam Dewberry told Nine's Today program on Friday.

"We are talking about tonnes and tonnes of bricks that could come down and become projectiles.

"That is why we have such a tight exclusion zone, not allowing anyone in including firefighters until we get the engineers in."

There were plans to turn the former hat factory into a 123-room, two-restaurant hotel at a cost of almost $40 million.

Once the area is safe, residents and businesses are expected to be allowed to return to their premises and the major thoroughfare Elizabeth Street will be reopened.

Among those locked out overnight was a bride getting married on Friday.

Firefighters were able to enter her apartment and collect her wedding dress during a run for essentials.

Supt Dewberry praised his crews for preventing significant damage to nearby buildings after fire spread into an apartment block and one suffered extreme heat damage to its exterior.

The cause of the blaze remains unknown.

The fire was one of the largest fires in the city for years, Fire and Rescue NSW acting Commissioner Jeremy Fewtrell said.

He said it was lucky no one was badly hurt in the extremely dangerous conditions.

The factory's roof collapsed, then the floors, before parts of the building's walls fell down shortly before 5pm, sending red hot bricks tumbling to the streets below.

A ute parked beside the building was also lost in the fire.

The only reported injury from the fire was a minor burn suffered by a firefighter.

Police are due to investigate the cause of the blaze.

© AAP 2023