Brazil and Germany spearheaded the resolution, which voiced deep concern over electronic surveillance and the interception of digital communications, as well as data collection by governments and private companies.
Brazil's government fell out with Washington at the time over revelations that the NSA had eavesdropped on President Dilma Rousseff. Snowden has said the United States also carried out large-scale electronic espionage in Germany.
"States must respect international human rights obligations regarding the right to privacy when they intercept digital communication of individuals and/ or collect personal data," Brazil's ambassador Regina Dunlop told the UN Human Rights Council in presenting the resolution.
The Geneva forum, whose 47 members include the United States, adopted the text unanimously. During the debate, Russia's delegation criticised mass surveillance by the United States while Cuba took aim at "certain Western powers".
US ambassador Keith Harper said Washington had backed the call for an investigator because it has long championed human rights domestically and internationally.
It was important for the new UN investigator to promote respect for "the right to protection from unlawful interference with the right to privacy", he said.
The Council said the special rapporteur, who has not yet been selected, would have three years to document violations and urged all states to cooperate with the new mandate.
Brazil and Germany has raised the privacy issue in the UNGeneral Assembly for the last two years in the wake of Snowden's revelations. Snowden, who has asylum in Russia, worked undercover at the US mission in Geneva from 2007-2009.
Amnesty International welcomed the new watchdog, saying that mass surveillance "particularly indiscriminate US and UK collection of online data" required Council attention.
"Security agencies show a misguided and ever-growing appetite for data collection. Someone has to watch the watchers," Amnesty International representative Peter Splinter said in a statement.
Eileen Donahoe, a former US human rights ambassador now with Human Rights Watch, said the New York-based activist group hoped the move "marks the beginning of a serious global reckoning with mass surveillance and its effects".
The rights council carries moral authority and its reports can be sent to the UN General Assembly for further action.
© Thomson Reuters 2015