A shanty town or squatter area is a settlement of improvised buildings known as shanties or shacks, typically made of materials such as mud and wood. A typical shanty town is squatted and in the beginning lacks adequate infrastructure, including proper sanitation, safe water supply, electricity and street drainage. Over time, shanty towns can develop their infrastructure and even change into middle class neighbourhoods. They can be small informal settlements or they can house millions of people.
Globally, some of the largest shanty towns are Ciudad Neza in Mexico, Orangi in Pakistan and Dharavi in India. They are known by various names in different places, such as favela in Brazil, villa miseria in Argentina and gecekondu in Turkey. Shanty towns are mostly found in developing nations, but also in the cities of developed nations, such as Athens and Madrid. Cañada Real is considered the largest informal settlement in Europe. They are usually found on places such as railway sidings, swampland or disputed building projects.
Shanty towns tend to begin as improvised shelters on squatted land. People build shacks from whatever materials are easy to acquire, for example wood or mud. There are no facilities such as electricity, gas, sewage or running water. The squatters choose areas such as railway sidings, preservation areas or disputed building projects. Swiss journalist Georg Gerster has noted (with specific reference to the invasões of Brasilia) that "squatter settlements [as opposed to slums], despite their unattractive building materials, may also be places of hope, scenes of a counter-culture, with an encouraging potential for change and a strong upward impetus".Stewart Brand has observed that shanty towns are green, with people recycling as much as possible and tending to travel by foot, bicycle, rickshaw or shared taxi. 
While most shanty towns begin as precarious establishments haphazardly thrown together without basic social and civil services, over time, some have undergone a certain amount of development. Often the residents themselves are responsible for the major improvements. Community organizations sometimes working alongside NGOs, private companies, and the government, set up connections to the municipal water supply, pave roads, and build local schools. Some of these shanties have become middle class suburbs. One such example is the Los Olivos neighbourhood of Lima, Peru, which now contains gated communities, casinos, and plastic surgery clinics.
Some Brazilian favelas have also seen improvements in recent years and can even attract tourists. Development occurs over a long period of time and newer towns still lack basic services. Nevertheless, there has been a general trend whereby shanties undergo gradual improvements, rather than relocation to even more distant parts of a metropolis.
Shanty towns are present in a number of developing countries. In Francophone countries, shanty towns are referred to as bidonvilles (French for "can town"); such countries include Haiti, where Cité Soleil houses between 200,000 and 300,000 people on the edge of Port-au-Prince.
In 2016, 62% of Africa's population was living in shanty towns.Khayelitsha in Cape Town, South Africa is reputed to be the largest shanty town in Africa and is a city in itself. The 2011 census revealed its population to be 99% black and a 2012 inquiry found that 12,000 households had no toilet. The Joe Slovo shanty town, also in Cape Town, houses an estimated 20,000 people. Shack dwellers in South Africa organise themselves in groups such as Abahlali baseMjondolo and Western Cape Anti-Eviction Campaign.
In Nairobi (Kenya), Kibera has between 200,000 and 1 million residents. There is no running water and inhabitants use a flying toilet in which faeces are collected in a plastic bag then thrown away.Mathare is a collection of slums which contain around 500,000 people. In Zambia, the informal housing areas are known as kombonis and approximately 80% of the people in the capital Lusaka are living in them.
The largest shanty town in Asia is Orangi in Karachi, Pakistan, which had an estimated 1.5 million inhabitants in 2011. The Orangi Pilot Project aims to lift local people out of poverty. It was begun by Akhtar Hameed Khan and run by Parveen Rehman until her murder in 2013. Residents laid sewage pipes themselves and almost all of Orangi's 8,000 streets are now connected. In India, an estimated one million people live in Dharavi, a shanty town built on a former mangrove swamp in Mumbai. It is one of the most densely populated places on the globe. In 2011, there were at least four improvised settlements in Mumbai containing even more people. There are in total 3.4 million people living in the 5,000 informal settlements of Bangladesh's capital city Dhaka.
Thailand has 5,500 informal settlements, one of the largest being a shanty town in the Khlong Toei District of Bangkok. In China, 171 urban villages were demolished before the 2008 Summer Olympics in Beijing. As of 2005, there were 346 shanty towns in Beijing, housing 1.5 million people. Author Robert Neuwirth wrote that around six million people, half the population of Istanbul lived in gecekondu areas.
The world's largest shanty town is Ciudad Neza or Neza-Chalco-Itza, which is part of the city of Ciudad Nezahualcóyotl, next to Mexico City. Estimates of its population range from 1.2 million to 4 million.
Brazil has many favelas. In Rio de Janeiro, Brazil, it was calculated in 2000 that over 20% of its 6.5 million inhabitants were living in more than 600 favelas. For example, Rocinha is home to an estimated 80,000 inhabitants. It has developed into a densely populated neighbourhood with some buildings reaching six storeys high. There are theatres, schools, nurseries and local newspapers.
In Argentina, shanty towns are known as villas miseria. As of 2011, there were 500,000 people living in 864 informal settlements in the metropolitan Buenos Aires area. In Peru they are known as pueblos jóvenes ("young towns"), as campamentos in Chile and as asentamientos in Guatemala.
During the 1930s Great Depression, shanty towns nicknamed Hoovervilles sprang up across the United States. Following the Great Depression, squatters lived in shacks on landfill sites beside the Martin Pena canal in Puerto Rico and were still there in 2010. More recently, cities such as Newark and Oakland have witnessed the creation of tent cities. The Umoja Village shanty town was squatted in 2006 in Miami, Florida. There are also colonias near the border with Mexico.
Although shanty towns are now generally less common in developed countries in Europe, they still exist. The growing influx of migrants has fuelled shantytowns in cities commonly used as a point of entry into the European Union, including Athens and Patras in Greece. The Calais Jungle in France had grown to over 8,000 people by the time of its eviction in October 2016.Bidonvilles exist in the peripheries of some French cities. The state authorities recorded 16,399 people living in 391 slums across the country in 2012. Of these, 41% lived on the outskirts of Paris.
In Madrid, Spain, a shanty town named Cañada Real is considered the largest informal settlement in Europe. It has an estimated 30,000 to 40,000 inhabitants, who are mainly Spanish, Romani and north African, but only one mobile health unit. After 40 years, property developers began to take an interest in the site in 2012.
There have been cardboard cities in London and Belgrade. In some cases, shanty towns can persist in gentrified areas that local governments have yet to redevelop, or in regions of political dispute. A major historical example was the Kowloon Walled City in Hong Kong.
Many films have been shot in shanty towns. Slumdog Millionaire centres around characters who spend most of their lives in Indian shanty towns. The Brazilian film City of God was set in Cidade de Deus and filmed in another favela, called Cidade Alta.White Elephant, 2012 Argentinian movie, is set in a villa miseria in Buenos Aires. The South African film District 9 is largely set in a township called Chiawelo, from which people had been forcibly resettled.