The Catholic-majority nation had one of the lowest ages of consent in the world, allowing adults to have sex with children as young as 12 if they agreed.
Under the revised law signed by President Rodrigo Duterte on Friday and made public Monday, sex with a person under 16 will be illegal and carry a maximum penalty of 40 years in jail.
"Having this law is a very good protective instrument for our children from sexual violence, whether or not it starts online or whether or not it also starts in a face-to-face encounter," said Margarita Ardivilla, child protection specialist at the UN children's fund UNICEF in the Philippines.
"It is very important to have a clear age to determine statutory rape and the below 12 of a 1930 law was just something that was unjustifiable."
Child rights activists have pushed for decades to increase the age of consent, but stubborn social norms in the deeply religious country where abortion and divorce are illegal had frustrated their efforts.
Both houses of Congress ratified the bill in December.
The poverty-afflicted Philippines has become a global hotspot for online child sex abuse and official data show around 500 girls aged 10-19 give birth every day.
Child rape and sexual abuse are also rampant.
A government-backed nationwide study in 2015 showed one in five children aged 13-17 had experienced sexual violence, while one in 25 were raped during childhood, UNICEF said.
The law "sends a very strong message that child rape is a heinous crime and must be punished accordingly", said Rowena Legaspi, executive director of the Children's Legal Rights and Development Center.
It offers the same protection to boys and girls, and requires the education department to include "age appropriate" lessons on children's rights in the basic school curriculum.
However, activists cautioned the law would only work to punish offenders or deter would-be abusers if it was properly enforced.
"I welcome it but I'm cynical about whether it will lead to implementation," said Junice Melgar, director of Likhaan Center for Women's Health.
Last year, Duterte declared preventing teenage pregnancies a "national priority", citing the increased risk of health problems for young mothers and their babies as well as the loss of earnings.
In January, he signed a bill into law banning child marriages in a country where one in six girls enters wedlock before the age of 18.
A separate bill targeting online sexual abuse and exploitation of children is working its way through Congress.