Most died after buying the black-market spirits, made from ethanol, water and fruit, from a couple in Sleman, north of Yogyakarta city. Several people were also taken to hospital.
The alleged maker and seller of the drink has been arrested.
It is not the first time moonshine has killed people in Muslim-majority Indonesia.
More than a dozen Indonesians died after drinking it at new year celebrations in 2014, and 25 people, four of them foreigners, died after drinking palm wine laced with methanol in Bali in 2009.
The most recent deaths occurred late last week. "Most of the victims were students," Sleman's police chief told AFP.
Since 2015, small shops in Indonesia have been banned from selling alcohol, despite fears by some critics that it would push people towards consuming illicit alcohol.
At least 24 people have died in recent days in central Java, Indonesia, from drinking illegally-produced alcohol.