"(It) will make people think a thousand times before committing such crimes," Attorney-General Muhammad Prasetyo said yesterday after the move was agreed at a cabinet meeting led by President Joko Widodo.
"This crime is extraordinary and there have been so many victims."
He said the punishment would be authorised soon through a presidential directive, which means it will automatically become law without parliament having to vote on it.
It would be carried out by injecting paedophiles with female hormones, he said.
Indonesia has been shocked by a series of high-profile child sex attacks. The most recent case was the kidnap, rape and murder of a nine-year-old girl.
Her body was discovered stuffed in a cardboard box in the capital Jakarta earlier this month, and an autopsy revealed that she had been repeatedly sexually assaulted.
Under current laws, child sex abuse is punishable by 15 years in jail but in many cases paedophiles have been handed short sentences.
