A statement from Buckingham Palace said today: "The Queen was deeply saddened to learn of the death of Nelson Mandela last night. He worked tirelessly for the good of his country, and his legacy is the peaceful South Africa we see today.
"Her Majesty remembers with great warmth her meetings with Mr Mandela and sends her sincere condolences to his family and the people of South Africa at this very sad time."
Prince Charles said: "Mr Mandela was the embodiment of courage and reconciliation. He was also a man of great humour and had a real zest for life. With his passing, there will be an immense void not only in his family's lives, but also in those of all South Africans and the many others whose lives have been changed through his fight for peace, justice and freedom."
David Cameron said: "A great light has gone out in the world. Nelson Mandela was a towering figure in our time; a legend in life and now in death - a true global hero."
"Across the country he loved they will be mourning a man who was the embodiment of grace".
"Meeting him was one of the great honours of my life. My heart goes out to his family - and to all in South Africa and around the world whose lives were changed through his courage."
President Barack Obama said the day Mr Mandela was released from prison and given him a sense of "what a human being can do when they're guided by their hopes and not by their fears".
"I cannot imagine my own life without the example that Nelson Mandela set.
"As long as I live I will do what I can to learn from him."
Mr Obama thanks the Mandela family for sharing "this extraordinary man" with the rest of the world.
He said Mr Mandela's legacy of a "free South Africa at peace with itself" was an example to the world.
"We will not likely see the likes of Nelson Mandela again," Mr Obama added.
Ed Miliband, leader of the Labour party, said: "The world has lost the inspirational figure of our age. Nelson Mandela taught people across the globe the true meaning of courage, strength, hope and reconciliation. From campaigner to prisoner to president to global hero, Nelson Mandela will always be remembered for his dignity, integrity and his values of equality and justice.
"He was an activist who became president and a president who always remained an activist. Right to the end of his life he reminded the richest nations of the world of their responsibilities to the poorest. Above all, he showed us the power of people, in the cause of justice, to overcome the mightiest obstacles. He moved the world and the world will miss him deeply."
London mayor Boris Johnson said: "When the definitive history of our time is written, the name Mandela will stand taller than most - perhaps tallest of them all.
"Nelson Mandela understood the most powerful tool at his disposal was the power of forgiveness. He faced down the tyranny and oppression of apartheid by embracing unity, by rejecting division, by proving without rancour or recrimination that his way was the right way, the best way, and the only way to bring about change."
Archbishop Desmond Tutu: "God was so good to us in South Africa by giving us Nelson Mandela to be our president at a crucial moment in our history. He inspired us to walk the path of forgiveness and reconciliation and so South Africa did not go up in flames."
FW de Klerk, South Africa's last apartheid-era president: "Although we were political opponents — and although our relationship was often stormy — we were always able to come together at critical moments to resolve the many crises that arose during the negotiation process."
American civil rights leader Jesse Jackson, who attended Mr Mandela's presidential inauguration, said: "My heart weighs heavy. The imprint he left on our world is everlasting.
"Nelson Mandela was a transformational figure; to say he was a 'historical figure' would not give him his full due.
"My heart burst with excitement on that day of Mandela's release from Victor Verster Prison, 11 February 1990. When word got out about his impending release, maids started doing the toya toya in the hallways, beating pots and pans, weeping and demonstrating.
"We've met numerous times in South Africa - the last time in 2010 where we spoke about boxing, sports, politics, and traded baseball caps.
"Nelson Mandela was a giant of immense and unwavering intellect courage and moral authority. He chose reconciliation over retaliation. He changed the course of history.
"Mandela is not gone, he remains with us always. He'll always be a chin bar to pull up on. Mandela has indeed forged South Africa as a new 'beauty from ashes'.
"He has left this earth, but he soars high among the heavens, and his eloquent call for freedom and equality is still heard amongst the winds and the rains, and in the hearts of the people the world over."
Former US president Bill Clinton said: "Today the world has lost one of its most important leaders and one of its finest human beings. And Hillary, Chelsea and I have lost a true friend.
"History will remember Nelson Mandela as a champion for human dignity and freedom, for peace and reconciliation.
"We will remember him as a man of uncommon grace and compassion, for whom abandoning bitterness and embracing adversaries was not just a political strategy but a way of life.
"Our thoughts and prayers go out to Graca and his family and to the people of South Africa.
"All of us are living in a better world because of the life that Madiba lived.
"He proved that there is freedom in forgiving, that a big heart is better than a closed mind, and that life's real victories must be shared."
Former US President George HW Bush said Mr Mandela had "changed the course of history".
"As President, I watched in wonder as Nelson Mandela had the remarkable capacity to forgive his jailers following 26 years of wrongful imprisonment - setting a powerful example of redemption and grace for us all," he said.
"He was a man of tremendous moral courage, who changed the course of history in his country. Barbara and I had great respect for President Mandela, and send our condolences to his family and countrymen."
Former President George W Bush said Mr Mandela was one of the "great forces for freedom and equality".
"He bore his burdens with dignity and grace, and our world is better off because of his example," he said in a statement.
"This good man will be missed, but his contributions will live on forever. Laura and I send our heartfelt sympathy to President Mandela's family and to the citizens of the nation he loved."
Secretary-General Ban Ki-moon said Mr Mandela was "a giant for justice" whose "selfless struggle for human dignity, equality and freedom" inspired many people around the world.
"No one did more in our time to advance the values and aspirations of the United Nations," he told reporters soon after Mr Mandela's death was announced.
"Nelson Mandela showed what is possible for our world, and within each one of us, if we believe a dream and work together for justice and humanity.
"Let us continue each day to be inspired by Nelson Mandela's lifelong example to keep working for a better and more just world."
The UN Security Council interrupted a meeting on the tribunals for former Yugoslavia and Rwanda and stood for a minute in silent tribute.
People, many in their pyjamas, began to gather outside Mr Mandela home in Houghton, a suburb of Johannesburg, The Times newspaper of South Africa reported.
A woman who was there with her two daughters broke down and cried. "I am glad that he is in a better place but I hope South Africans will be able to deal with his death," she said.
Dominic Sadie, 19, said: "If it wasn't for Mandela, I wouldn't be chilling with my black friends. I love him."
"I am shocked... I can't believe it," eight-year-old Riaaz Muhamad said.
French Foreign Minister Laurent Fabius said in a statement that Mr Mandela was "a charismatic giant".
"With Nelson Mandela, the father of South Africa has died, the driving force for freedom and for reconciliation," he said.
Microsoft tycoon and philanthropist Bill Gates said: "It was an honour to meet President Nelson Mandela a number of times. We left each visit inspired and more optimistic about the opportunity to improve the lives of the poor throughout the world.
"From prisoner to president, Nelson Mandela was tireless in his pursuit of equality and justice for all people.
"President Mandela was a remarkable example to us, to our foundation, and to the whole world thanks to a life imbued with courage, dedication and compassion.
"Our thoughts and prayers are with Graca Machel and President Mandela's family. We join with the people of South Africa in grieving the loss of this extraordinary and inspirational leader."
Actor and former governor of California Arnold Schwarzenegger said he would "never forget the time I spent with President Mandela".
"Even before I met him, he was one of my heroes. But during the opening ceremony of the Special Olympics in South Africa, I had the opportunity to stand with him in his former jail cell at Robben Island to light the torch, and his legend grew before my eyes," he said.
"He told me about his struggles, his time in captivity, his persecution and oppression. Most people would have had nothing in their heart but revenge, but all President Mandela had was forgiveness. He is the definition of serving a cause greater than self. He singlehandedly reunited his nation, because he had a vision of the future that should inspire all of us.
"President Mandela's life is the closest thing we have to proof of God. I will never be able to thank him enough for his inspiration. Today, each of us should commit to do at least one small thing to improve the planet in his honor. Give back. Help someone. Change the world.
"My thoughts and prayers are with his family and the people of South Africa."
Actor Samuel L. Jackson said on Twitter: "Never met a better person in my life than Nelson Mandela. My sympathy to his family & his country."
Actor and broadcaster Stephen Fry said: "Oh no. Just heard. Madiba dead. One of the greatest ever to share the planet with us."
Actor Eva Longoria said: "Today the world lost one it's greatest leaders. Rest in peace Mandela."
Canada's prime minister Stephen Harper said on Twitter: "All of Canada mourns with the family of Nelson Mandela and the citizens of South Africa. The world has lost one of its great moral leaders."
Prime William said Mr Mandela's death was "extremely sad and tragic news".
"We are reminded of what an extraordinary and inspiring man Nelson Mandela was," Prince William said.
American civil rights leader the Rev. Al Sharpton said the world "has lost one of history's greatest citizens".
"Anytime you were around him you had a sense you were in the presence of greatness. Nelson Mandela had this gravity yet humility that was unmatched," Mr Sharpton on US cable channel MSNBC. "The world has lost someone who has literally changed world history. This is not just the first black president, this is one who led the revolution and evolution of a nation."
Former prime minister Tony Blair said the political leader was a "great man" who had made racism "not just immoral but stupid".
"He was a unique political figure at a unique moment in history," he said. "Through his leadership, he guided the world into a new era of politics in which black and white, developing and developed, north and south, despite all the huge differences in wealth and opportunity, stood for the first time together on equal terms."
Neath MP Peter Hain, whose family fled South Africa because of their support for the anti-apartheid movement, said Mr Mandela was the "icon of all icons".
Irish Taoiseach Enda Kenny described Mr Mandela's death as "a great light extinguished".
"The name Mandela stirred our conscience and our hearts. It became synonymous with the pursuit of dignity and freedom across the globe," Mr Kenny said.
"As we mark his passing, we give thanks for the gift of Nelson Mandela. We ask that his spirit continues to inspire, guide and enlighten us as we strive to bring freedom and dignity to the family of man, our brothers and sisters, across the world."
Shadow Chancellor Ed Balls wrote on Twitter: "Seeing Nelson Mandela walking free is one of the great moments of my life - proving leadership and hope can triumph. Thank you. RIP"
Cape Town Archbishop Thabo Makgoba has released a prayer for former president Nelson Mandela, who died on Thursday, the Anglican Church of Southern Africa said.
"Go forth, revolutionary and loving soul, on your journey out of this world, in the name of God, who created you, suffered with you and liberated you," the prayer read.
"Go home Madiba, you have selflessly done all that is good, noble and honourable for God's people.
"We will continue where you have left off, the Lord being our helper."
American actor Morgan Freeman, who played Mandela in a 2009 film, described Mr Mandela as "a saint to many, a hero to all who treasure liberty, freedom and the dignity of humankind".
"Madiba may no longer be with us, but his journey continues on with all of us," he said.
IMF chief Christine Lagarde said on Twitter: "Deeply saddened by the passing of #Mandela, a courageous, visionary leader who will always be remembered and will continue to inspire us all."
Former astronaut Buzz Aldrin, the second man on the Moon, said: "Rest in Peace Nelson Mandela. A true inspiration & role model for peace & international collaboration. We will continue to learn from him."
Nelson Mandela's friend George Bizos told BBC World Service: "None of us are immortal, this was expected … but it's really difficult for me to come to come to terms with."
US Republican senator John McCain tweeted: "RIP Nelson Mandela, whose courage and character inspired South Africa and the world."
Amnesty International secretary general Salil Shetty said: "As a world leader who refused to accept injustice, Nelson Mandela's courage helped change our entire world.
"The death of Nelson Mandela is not just a loss for South Africa. It is a loss for people all over the world who are fighting for freedom, for justice and for an end to discrimination.
"Nelson Mandela's commitment to human rights was epitomised by his unswerving resolve to stamp out racial inequality during apartheid, followed by his vital work in combating HIV/Aids in South Africa. His legacy across Africa, and the world, will stand for generations.
"Nelson Mandela was a political prisoner, detained also for his conscience. He was a man who understood how exclusion of groups destroys the social fabric of a country by creating a politics of inequality.
"The human rights movement around the world owes Nelson Mandela a debt of gratitude. All of us who admired him must carry on his struggle."