The president’s office said Mr Mandela, aged 92, was undergoing “specialised” tests in Johannesburg and “there is no need to panic”.
Friends and family visited Mr Mandela during the day.
Security was tight outside the hospital and police were called to control traffic as a scrum of journalists grew.
Media have also gathered outside Mr Mandela’s home in Houghton, a wealthy suburb of north-east Johannesburg.
In a statement on Thursday, the South African presidency said it wanted to “assure the nation and the world that the former president is in high spirit”.
“Dr Mandela suffers from ailment common to people of his age, and conditions that have developed over years. We may recall that he has suffered from tuberculosis whilst on Robben Island and has had previous respiratory infections.”
Click to play
Click to play
In a message for Nelson Mandela Archbishop Tutu said: ‘We thank God for you’
President Jacob Zuma earlier said that Mr Mandela had flown from Cape Town to Johannesburg and had gone to the Milpark Hospital on Wednesday for a check-up.
Mr Zuma, speaking from Davos in Switzerland, where he has been attending the World Economic Forum, said: “Given his age he has been taken into a hospital for a check-up. I’m sure check-ups are more frequent than when he was a healthy young man.”
Children at a local school have hung messages of support outside the Milpark Hospital.
Word has quickly spread that Mr Mandela is in hospital, with US President Barack Obama adding his voice and wishes for a speedy recovery.
The South African liberation hero – known affectionately among South Africans by his clan name, Madiba – has appeared increasingly frail on his infrequent public appearances since retiring from public life in 2004.
His last public appearance was at the football World Cup closing ceremony last July.
Students pose with a giant get-well card Local school children urged Mr Mandela to get well soon
South African Nobel Peace Prize winner Archbishop Desmond Tutu told reporters on Thursday that Mr Mandela was “frail” when he saw him last week, the Sapa news agency reported.
“He was all right, I mean, he’s 92, you know.
“What more do we want from him? We want him to remain forever, but you know… anything can happen.”
Privately Mr Mandela’s friends have warned that his health has begun to deteriorate more rapidly in recent months, says the BBC’s Andrew Harding in Johannesburg.
Media speculation about his health is increasingly frenzied.
Police are checking visitors’ cars at the hospital entrance to make sure there are no journalists hiding inside.
Journalists’ cars were lining the streets and snarling up the traffic, prompting irate outbursts from other drivers, reports said.
In a statement on Wednesday, the Nelson Mandela Foundation insisted Mr Mandela was “in no danger and is in good spirits”.
It said he was undergoing routine tests, though South African media report he is being seen by a lung specialist.
African National Congress spokesman Jackson Mthembu said on Thursday urged “people not to make unfounded statements, let’s remain calm and not press panic buttons because there is no reason to do so”.
Earlier this month, a report circulated on social network Twitter that the elder statesman had died.
It was condemned as malicious and insensitive by the ANC – BBC