Aulia Rakhman was found guilty of violating blasphemy laws after joking about the name of the Islamic prophet Mohammed during a performance in the Sumatran city of Lampung in December.
A video of his performance, widely shared on social media, showed him quipping that the holiness of the name was no longer valid given that so many people in prison were named Mohammed.
Many Indonesians are named Mohammed, after the prophet.
Human rights and free speech advocates have expressed concern over the interpretation of the blasphemy law, which has mostly been used against those deemed to have insulted Islam.
Usman Hamid, executive director of Amnesty International Indonesia, said the blasphemy article in the law has caused many "innocent people" to be jailed.
"We urge this article to be abolished," he said.
Andreas Harsono, the Indonesia researcher for Human Rights Watch, said the case showed "once again, the toxic nature of the blasphemy law in Indonesia".
The stand-up comedy show was part of a campaign event for Indonesian presidential candidate, Anies Baswedan, who lost the elections this February. Baswedan did not attend the show.
The court in Lampung sentenced Aulia last week, but court documents were only made available days after the decision.
The law has in the past ensnared the former popular Christian governor of Jakarta, Basuki Tjahaja Purnama, who was sentenced to two years in prison in 2017 for blasphemy.
In September 2023, an Indonesian court also sentenced a woman to two years in prison after she posted a video on TikTok, in which she recited a Muslim prayer before eating pork.