Crowds paid tribute, dancing and singing in front of Mr Mandela's former home in Soweto throughout the night.
Flags flew at half mast after President Jacob Zuma announced his death in a late night national TV address.
The Queen has said she is "deeply saddened" to learn of Nelson Mandela's death and has sent her "sincere condolences to his family and to the people of South Africa".
A statement from Buckingham Palace said: "Her Majesty remembers with great warmth her meetings with Mandela".
A book of condolence has opened for members of the public to sign at St Margaret's Church, Westminster Abbey.