The national statistics agency of South Africa (StatsSA) informed that this marked a 19.8% increase from 51.8 million in 2011 when the last census was conducted.
"This is the fourth census undertaken since the advent of democracy in 1994, and, as such, it contributes to a vast body of knowledge that describes the state and the progress of our nation," President Cyril Ramaphosa told a press conference in Pretoria.
The census carried out in 2022 found that more than 81% of South Africans were Black Africans, 8.1% identified as "coloured" or mixed-race, 7.3% were white and 2.7% of Indian or Asian descent.
StatsSA head Risenga Maluleke said the figure for the white population was "of interest", with its share of the total having dropped from nine percent in 2011.
Gauteng, the province home to the country's economic capital Johannesburg, was the most populous region with more than 15 million people, the census found.
In addition, Gauteng and Cape Town's Western Cape have also received the largest influx of new residents.
Almost all households now had access to electricity and more than eight in ten to running water, StatsSA said.