King Bhumibol Adulyadej, center, prepares to pray and burn incense to the Emerald Buddha, the "talisman" of the Thai kingdom, in Bangkok in 1996. (RICHARD VOGEL/Associated Press)

THE INTERNET has enabled billions of people to share opinions freely, providing personal communication as never before. But it also is a hunting ground for tyrants who cannot tolerate freedom of expression. Dictators have long sought to silence dissidents and journalists, and now they muzzle anyone who tweets or posts what they regard as an affront. Today’s road to repression runs through Facebook, Twitter and Instagram.

Take the case of Merve Buyuksarac, who was Miss Turkey in 2006. On May 31, she was handed a 14-month suspended prison sentence for insulting President Recep Tayyip Erdogan through a poem she shared on Instagram referring to a high-level corruption scandal. Insulting the president is a crime punishable by up to four years in jail in Turkey, a law rarely used until Mr. Erdogan was elected president in 2014. Prosecutors have opened more than 1,800 cases against people for insulting him.

Or consider Andrei Bubeyev of Russia, sentenced to two years and three months in prison on May 6 for calling for “acts of extremism” and “actions undermining Russia’s territorial integrity.” He had shared on VKontakte, a Russian social media platform, a picture of a toothpaste tube with the caption, “Squeeze Russia out of yourself!” and a post by a controversial blogger with the headline “Crimea is Ukraine.” He was prosecuted under a law signed by President Vladi­mir Putin in 2014 making it a criminal offense, punishable by up to five years in prison, to call for anyone “to destroy” Russia’s territorial integrity, including Crimea, which Russia seized from Ukraine. Mr. Bubeyev’s wife said he had only 12 friends on VKontakte and could not have coerced anyone to destroy anything. According to the Associated Press, at least 54 people were sent to prison in Russia for hate speech last year, most of them for sharing and posting things online, nearly five times as many as five years ago.

Maung Saungkha, a poet in Burma, wrote in a Facebook post in October that he had a tattoo of the country’s president on his penis. On May 24, he was found guilty of defamation and sentenced to a six-month jail term, and released for time served. He actually didn’t have such a tattoo, he said, but suggesting it in an off-color poem apparently about Thein Sein — president until the end of March — was enough to bring the wrath of the state to his door. Equally absurd were charges brought in Thailand against a factory worker, Thanakorn Siripaiboon, for spreading Facebook images and comments that were deemed to mock the king’s dog. Thailand, where insulting the monarchy is a crime, is entering its third year under a military dictatorship. The precise insult to the royal dog was not disclosed.

For a long time, it was assumed that the digital age would be a powerful accelerant to free speech, but these and many other examples show it can go in both directions. It’s no longer acceptable to take for granted that the Internet will be a force for freedom. Democracies and the innovative companies that gave rise to the digital revolution — and anyone else who cares about liberty and unfettered expression — must work to keep the Internet free and not a graveyard of dissent.