The fire broke out just after midnight in the basement of the four-story building on Howe Avenue in Shelton.
Flames quickly spread to an attached building, which was also badly damaged in the fire.
Authorities believe everyone got out before the top floors collapsed into the middle of the building.
At least 30 people were forced out of their homes by the fire.
The conditions of the people brought to the hospital haven't been released.
Officials say they were forced to bring water to the scene in tanker trucks because hydrants weren't working due to a water main break. A fire truck was damaged during the collapse.
The building housed businesses on the first floor and apartments on the upper floors.
Fire marshals will be investigating the cause of the fire.