Families in Jakarta neighbourhoods waded through murky chest-high flood waters, clutching their belongings, while others were ferried to safety in rubber dinghies, local TV stations showed.
"Five people have died in Jakarta so far from drowning or electrocution in the floods," National Disaster Mitigation Agency spokesman Sutopo Purwo Nurgoho told AFP.
More than 4,300 people in the capital have been displaced by the floods, which also worsened the city's notorious traffic jams.
Meanwhile the death toll rose to 18 late Friday in the northern part of Indonesia's Sulawesi island, which has suffered flash floods and landslides. Two people there are still missing, Nugroho said.
The Sulawesi deluge, which ripped more than 100 homes from their foundations, is receding as the downpour there eases, Nugroho said, adding that three-quarters of the 40,000 people initially displaced there have returned to their homes.
Indonesia is regularly hit with deadly floods and landslides during its wet season, which lasts for around six months.
Environmentalists blame logging and a failure to reforest denuded land for exacerbating the floods.