South Africa is a nation of about 55 million (2016) people of diverse origins, cultures, languages, and religions. The last census was held in 2011. South Africa is home to an estimated 5 million illegal immigrants, including some 3 million Zimbabweans. A series of anti-immigrant riots occurred in South Africa beginning on 11 May 2008.

Statistics South Africa asks people to describe themselves in the census in terms of five racial population groups. The 2011 census figures for these groups were Black African at 79.2%, White at 8.9%, Coloured at 8.9%, Asian at 2.5%, and Other/Unspecified at 0.5%. The first census in South Africa in 1911 showed that whites made up 22% of the population; it declined to 16% in 1980.

South Africa hosts a sizeable refugee and asylum seeker population. According to the World Refugee Survey 2008, published by the US Committee for Refugees and Immigrants, this population numbered approximately 144,700 in 2007. Groups of refugees and asylum seekers numbering over 10,000 included people from Zimbabwe (48,400), The Democratic Republic of the Congo (24,800), and Somalia (12,900). These populations mainly lived in Johannesburg, Pretoria, Durban, Cape Town, and Port Elizabeth. Many refugees have now also started to work and live in rural areas in provinces such as Mpumalanga, KwaZulu-Natal and the Eastern Cape.