By Agence France-Presse
Officers late Sunday raided a building in the capital Jakarta called Atlantis that houses a sauna and a gym, and halted the event they said was called "The Wild One".
Pictures circulating online showed topless men sitting crammed in a room next to gym equipment after the police raid.
"Our officers did an undercover investigation and raided the place on Sunday," senior detective Nasriadi, who like many Indonesians goes by one name, told AFP.
Homosexuality and gay sex are legal everywhere in Indonesia except in conservative Aceh province, but Nasriadi said that 10 of those arrested in the Jakarta raid could be charged under Indonesia's tough anti-pornography laws.
These include the alleged organisers of the event as well as men suspected of being prostitutes and striptease dancers. Those found guilty of breaking the laws face up to 10 years in jail.
The other detained men are still being questioned by police as potential witnesses in the case, the detective said.
It is the latest sign of growing hostility towards Indonesia's small lesbian, gay, bisexual and transgender (LGBT) community. Since last year, ministers, hardliners and influential Islamic groups have been lining up to publicly denounce homosexuality.
Earlier this month Indonesian police detained eight men in the city of Surabaya for allegedly holding a gay party, and they could also be charged under the anti-porn laws.
Last week an Islamic court in Aceh also sentenced two men to be publicly caned for having gay sex, the first time such a punishment has been handed down for homosexual activities in the conservative province.
The backlash against the homosexual community began in early 2016, and activists believe it was triggered by widespread media coverage of a decision in the United States to legalise same-sex marriage.