The court said a section of the Cybercrime Prevention Act of 2012 "which penalises online or cyber libel is not unconstitutional", spokesman Theodore Te said.
However the ruling would only cover the original sender of the allegedly libellous material and not the recipients, Te said.
The cybercrime law was passed in 2012, but the high court suspended its implementation after various groups sued to have it declared unconstitutional.
"No one should go to prison just for expressing oneself, specially on the Internet, where people express their frustration with government," he said.
More From This Section
President Benigno Aquino signed the law to stamp out cybercrimes such as fraud, identity theft, spamming and child pornography.
But opponents quickly said it gave the government wide powers to curb freedoms on the Internet due to provisions that impose heavy prison terms for online libel.
The law also gives the state power to shut down websites and monitor online activities in a country where major protests have been organised through Facebook and Twitter.