Rio de Janeiro
Rio has more people living in slums than any other city in Brazil, according to the 2010 Census. More than 1,500,000 people live in its 763 favelas, 22% of Rio's total population. São Paulo, the largest city in Brazil, has more favelas (1,020) in sheer numbers, but proportionally has fewer people living in favelas than Rio.
Nilópolis
Nilópolis (, , ) is a municipality in Brazil, located in the Rio de Janeiro state's southwestern region, bordering São João de Meriti, Mesquita and Rio de Janeiro. It is the smallest municipality in Rio de Janeiro state, with a total area of 19.39 km². The population of 157,483 inhabitants living in an area of 9 km² and the remaining area corresponds to the Gericinó's Natural Park. Officially, the population density exceeds 8,120 inhabitants/km², but if calculated just 9 km² occupied, it becomes the most densely populated city in Brazil with more than 17.400 inhabitants/km². Currently, São João de Meriti has the highest population density, with 12,897 inhabitants/km².