Sex outside marriage will carry a jail term of up to a year under the new laws, which take effect in three years. Under the laws unmarried couples caught having sex can be jailed for up to a year. They are also banned from living together - an act for which people could be jailed for up to six months. Adultery will also be an offence for which people can be jailed.
The new laws will apply equally to locals and to foreigners living in Indonesia, or visiting holiday destinations such as Bali.
Prosecutions will start once a complaint has been filed by the children, parents or spouse of the accused couple.
Human Rights Watch's Asia Director Elaine Pearson told the BBC it was a "huge setback for a country that has tried to portray itself as a modern Muslim democracy".
For the first time since its independence, Indonesia will make it illegal to persuade someone to be a non-believer.
New defamation articles also make it illegal for people to insult the president.