The UN human rights chief, Navi Pillay, has compared the uproar in the international community caused by revelations of mass surveillance with the collective response that helped bring down the apartheid regime in South Africa.

Pillay, the first non-white woman to serve as a high-court judge in South Africa, made the comments in an interview with Sir Tim Berners-Lee on a special edition of BBC Radio 4's Today programme, which the inventor of the world wide web was guest editing.

Pillay has been asked by the UN to prepare a report on protection of the right to privacy, in the wake of the former National Security Agency analyst Edward Snowden leaking classified documents about UK and US spying and the collection of personal data.

The former international criminal court judge said her encounters with serious human rights abuses, which included serving on the Rwanda tribunal, did not make her take online privacy less seriously. "I don't grade human rights," she said. "I feel I have to look after and promote the rights of all persons. I'm not put off by the lifetime experience of violations I have seen."

She said apartheid ended in South Africa principally because the international community co-operated to denounce it, adding: "Combined and collective action by everybody can end serious violations of human rights … That experience inspires me to go on and address the issue of internet [privacy], which right now is extremely troubling because the revelations of surveillance have implications for human rights … People are really afraid that all their personal details are being used in violation of traditional national protections."

The UN general assembly unanimously voted last week to adopt a resolution, introduced by Germany and Brazil, stating that "the same rights that people have offline must also be protected online, including the right to privacy". Brazil's president, Dilma Rousseff, and the German chancellor, Angela Merkel, were among those spied on, according to the documents leaked by Snowden.

The resolution called on the 193 UN member states "to review their procedures, practices and legislation regarding the surveillance of communications, their interception and collection of personal data, with a view to upholding the right to privacy of all their obligations under international human rights law". It also directed Pillay to publish a report on the protection and promotion of privacy "in the context of domestic and extraterritorial surveillance ... including on a mass scale". She told Berners-Lee it was "very important that governments now want to discuss the matters of mass surveillance and right to privacy in a serious way".

Berners-Lee has warned that online surveillance undermines confidence in the internet, and last week published an open letter, with more than 100 free speech groups and leading activists, to protest against the routine interception of data by governments around the world.