Johannesburg is in fact the capital of Guanteng and one of five districts in this province.
It is however not the capital of South Africa, which is a status shared by three cities: Pretoria, Bloemfontein and Cape Town (with Pretoria having the primary status).