Anyone found guilty of transmitting pornographic material, false news or racial and religious hate messages on the Internet could face up to six years in prison or a fine of 1 billion rupiah ($109,000).
Pornography has been a topic of debate for years in Indonesia, where the population is mostly Muslim.
"I think we all agree there's no way we can save this nation by spreading pornography, violence and ethnic hostility," Information Minister Mohammad Nuh told reporters.
Members of the public reportedly asked the government to block sites with pornographic or violent content. The request was essentially granted with the passage of the Electronic Information and Transactions Law, which will allow courts to accept electronic material as evidence in cases involving Internet abuse.
Officials said the government plans to start implementing restrictions on sites containing banned material as early as April.
Software for blocking sites will be available for download at the ministry's website, DepKomInfo.go.id.