Anyone found guilty of breaking the law faces six years in prison and a fine equivalent to US$109,000.
"I think we all agree there's no way we can save this nation by spreading pornography, violence and ethnic hostility," said Indonesia's Information Minister, Mohammad Nuh.
The Electronic Information and Transactions Law was passed with support from all major parties. It was partially inspired by the decision to have free internet access for all Indonesian schools.
The blocking software is available as a free download from the Information Ministry website and needs to be downloaded onto individual PCs.
In the future the government wants to build a system that would block the content at an ISP level.
Indonesia is 85 percent Muslim and already has strict laws regarding offensive content. Last year the publisher of the local edition of Playboy was cleared of distributing and making money from indecent pictures.