A UN committee has called for an end to excessive electronic surveillance and expressed concern at the harm such scrutiny, including spying in foreign states and the mass collection of personal data, may have on human rights.

The UN General Assembly's Third Committee, which deals with human rights issues, adopted a German and Brazilian-drafted resolution which seeks to protect the same offline rights enjoyed by citizens online.

The resolution is expected to be put to a vote in the 193-member General Assembly next month.

The United States, Britain, Australia, Canada and New Zealand - known as the Five Eyes surveillance alliance - supported the draft resolution after language that had initially suggested foreign spying could be a human rights violation was weakened to appease them.

The draft text does not point the finger at a specific country, but comes after former US National Security Agency contractor Edward Snowden released details of a global spying program by the NSA, sparking international outrage.

"We firmly believe that privacy rights and the right to freedom of expression must be respected both online and offline," US delegate Elizabeth Cousens told the committee after the draft resolution was adopted.

Cousens said it was imperative that human rights and civil society activists be able to use the internet freely and without fear of reprisal to protect "dignity, fight against repression, and hold governments, including mine, accountable."

General Assembly resolutions are non-binding, unlike resolutions of the 15-nation Security Council. But assembly resolutions that enjoy broad international support can carry significant moral and political weight.

The draft resolution notes "that while concerns about public security may justify the gathering and protection of certain sensitive information, states must ensure full compliance with their obligations under international human rights law."

Privacy 'pivotal' to democracy

It calls on states to review procedures, practices and legislation on communications surveillance and "to establish or maintain existing independent, effective domestic oversight mechanisms capable of ensuring transparency, as appropriate, and accountability for state surveillance of communications, their interception and collection of personal data."

It also asks UN human rights chief Navi Pillay to present a report to the UN Human Rights Council and the UN General Assembly on the protection and promotion of the right to privacy in domestic and extraterritorial surveillance, and the interception of digital communications and collection of personal data, including on a mass scale.

"Human right to privacy is pivotal to any democratic society," Brazil's UN ambassador, Antonio de Aguiar Patriota, told the committee. "Full participation in democracy implies full protection of individual liberties, including the right to privacy in the digital age."

Brazilian president Dilma Rousseff and German chancellor Angela Merkel have both condemned the widespread spying by the US National Security Agency. The NSA is accused of accessing tens of thousands of French phone records and monitoring phone calls by Merkel and Rousseff.

A North Korean UN delegate said spying on heads of state was "a rampant violation of sovereignty and it is interference into the internal affairs, it is an insult, very unbearable."

North Korea, one of the world's most reclusive and repressive nations, was one of dozens of co-sponsors of the draft resolution.