While Thais may be afraid to rebel against accepted orthodoxies in public, they unleash caustic criticisms with gusto onto the Internet, often anonymously.

Mr. Surachai said the number of pages with anti-monarchy sentiments had increased sharply after the September 2006 military coup. The coup cleaved deep divisions in Thai society and prompted the creation of the “Red Shirts,” a movement that opposed the military’s intervention in politics and supported the deposed prime minister, Thaksin Shinawatra.

To many outsiders, Thailand is a fun-loving, freewheeling country where the rule of law often bends like a reed in the wind. But the “institution,” as the monarchy is often called here, is a bold-faced asterisk to the country’s anything-goes ethos. Many Thais lose their sense of humor when it comes to defending the king.

Anxiety is rising about the health of King Bhumibol, who turns 84 years old this December. The king has spent the past two years in the hospital, and his public appearances have become more rare.

Anyone who “defames, insults or threatens the king, the queen, the heir apparent or regent” can be sentenced to prison terms of as long as 15 years under Thai law. In addition, the country’s Computer Crimes Act, which was passed by a military-installed government in 2007, calls for prison terms of as long as five years for the digital dissemination of information that threatens the security of the country or violates the “peace and concord or good morals of the people.”

Some cases of lèse-majesté are clear-cut, Mr. Surachai said. He does not hesitate to block a Web page that displays a picture of the king with a foot above his head, a grave insult. Also an obvious offense, Mr. Surachai said, is the practice of using a very informal pronoun before the king’s name, one of the many subtleties of the Thai language that are lost in translation.

But often the hunt for royal insults is more subtle. “They usually post metaphors,” Mr. Surachai said of suspected offenders. “They have their own code words.”