Two 13-year-old boys have been charged over the fire that destroyed a seven-storey building in Sydney.

The 111-year-old former hat factory on Randle Street, Surry Hills, was razed to the ground by the blaze on May 25.

Two neighbouring buildings were also so badly damaged that they had to be torn down.

Two 13-year-old boys have been charged over the fire that destroyed a seven-storey building in Sydney

Chaotic scenes saw hundreds of people evacuated from nearby homes and offices as smoke poured over the city and more than 100 firefighters battled the inferno.

Now, two 13-year-old boys have been charged over the fire.

They are charged with of destroying property in company using fire etc more than $5000, and entering enclosed land not prescribed premises without lawful excuse.

One of the boys was also charged with two counts of shoplifting, with the offences alleged to have happened at a grocery store on Elizabeth Street on the day of the fire.

The boys will appear in children's court on October 4.

The building burst into flames about 4pm and had almost entirely toppled over by 6pm, with chunks of debris from the roof and walls falling onto the street below, while thousands of horrified commuters and workers watched on.

The fire caused a 'tornado of smoke' and the heat could be felt even a block away.