Crews were called to the 2500 block of North 2nd Street in North Philadelphia around 3 a.m. Thursday.
Smoke and flames poured from the back of the building on the third floor.
Everyone was able to get out safely.
The Red Cross is helping the victims.