Edward J. Snowden, the American who has probably left the biggest mark on public policy debates during the Obama years, is today an outlaw. Mr. Snowden, a former National Security Agency contractor who disclosed to journalists secret documents detailing the United States’ mass surveillance programs, faces potential espionage charges, even though the president has acknowledged the important public debate his revelations provoked.

Mr. Snowden’s whistle-blowing prompted reactions across the government. Courts found the government wrong to use Section 215 of the Patriot Act to justify mass phone data collection. Congress replaced that law with the USA Freedom Act, improving transparency about government surveillance and limiting government power to collect certain records. The president appointed an independent review board, which produced important reform recommendations.

A supporter of Edward Snowden holds a combination photo featuring U.S. President Barack Obama and Edward Snowden, during a news conference in Hong Kong on June 14, 2013. © 2013 Reuters

That’s just in the American government. Newspapers that published Mr. Snowden’s revelations won the Pulitzer Prize. The United Nations issued resolutions on protecting digital privacy and created a mandate to promote the right to privacy. Many technology companies, facing outrage at their apparent complicity in mass surveillance, began providing end-to-end encryption by default. Three years on, the news media still refer to Mr. Snowden and his revelations every day. His actions have brought about a dramatic increase in our awareness of the risks to our privacy in the digital age — and to the many rights that depend on privacy.

Yet President Obama and the candidates to succeed him have emphasized not Mr. Snowden’s public service but the importance of prosecuting him. Hillary Clinton has said Mr. Snowden shouldn’t be brought home “without facing the music.” Donald J. Trump has said, “I think he’s a total traitor and I would deal with him harshly.”

Most of Snowden's detractors seem to adhere to some version of Dick Cheney's "one percent rule" wherein vast security measures are justified...

Not only should Mr. Snowden be pardoned, he should be held up as a role model and national hero. The same is true for Chelsea Manning.

"Under the antiquated Espionage Act of 1917, the only issue is whether “national defense” information was given to someone not authorized to...

Eric H. Holder Jr. struck a more measured tone in May, about a year after he left office as Mr. Obama’s attorney general. He recognized that while Mr. Snowden broke the law, “he actually performed a public service” by raising the national debate on surveillance practices.

The law the Obama administration wants to use to prosecute him takes no account of whether revealing this information was a public service. Under the antiquated Espionage Act of 1917, the only issue is whether “national defense” information was given to someone not authorized to receive it. It doesn’t matter if the secrets revealed wrongdoing or if they endangered the national defense, whether they were passed to an American journalist or to a foreign enemy.

There is obviously a public interest in enabling the government to keep some national security information secret. But under international human rights law, the public interest — not any particular government’s interest — is crucial. The protection of national security and public order may provide legitimate reasons for not disclosing certain sensitive information, but suppressing embarrassing or disturbing news does not. No one should be prosecuted for exposing human rights violations. At the very least, there has to be a genuine opportunity to offer a public interest defense.

The enormous value of Mr. Snowden’s revelations is clear. What was their harm? Scant evidence has been provided for many officials’ ominous statements. Some officials have warned that the terrorism-related activity of certain groups has become harder to monitor, but the most dangerous adversaries have always taken precautions against surveillance, with at least one independent study showing little impact from the Snowden revelations.

What has changed is that since the staggering extent of government surveillance became known, the public has sought greater privacy, and corporations have begun to provide it on widely used platforms. No doubt, among the millions of users of encrypted technologies there are a few who hide criminal activity. But the rest of us just want our privacy back.

Since the United States canceled his passport, stranding him in the Moscow airport, Mr. Snowden has continued to demonstrate the principles that led him to disclose profoundly disturbing facts about surveillance overreach. He is the head of a human rights group, the Freedom of the Press Foundation; he’s developing technology to protect journalists in dangerous zones around the world from life-threatening surveillance; and he has frequently criticized the human rights and technology policies of Russia, the only country that stands between him and a high-security prison in the United States.

From George Washington onward, the pardon power has enabled American presidents to further the national interest. Whistle-blowers can perform a vital role in protecting human rights, and those who disclose rights violations that are shielded by an official cloak of secrecy are among the most important of all. As Mr. Snowden put it, if “people reporting wrongdoing of the most serious nature have to basically stand up and light themselves on fire, we are very quickly going to find ourselves out of volunteers the very moment when society needs them the most.”

In his biography on Twitter, Mr. Snowden says: “I used to work for the government. Now I work for the public.” That should not be something that gets you locked up for a lifetime or compels you to live in exile. The president has an opportunity to correct that injustice. It’s time to pardon Mr. Snowden and bring him home, not to face the music but to work for the security and privacy of us all.

Correction: September 17, 2016 

An Op-Ed article on Thursday about pardoning Edward Snowden misstated when Eric H. Holder Jr. left office as attorney general. It was in April 2015, not in May 2016.