In the deadliest of the two attacks, a suicide bomber detonated an explosives-rigged vehicle at a popular ice cream shop at around midnight (2100 GMT Monday), killing at least 16 people and wounding 75.
The bomber struck just days after the start of the holy Muslim fasting month of Ramadan, during which Iraqis often stay out late shopping or socialising after breaking their daily fast.
ISIS issued a statement claiming the attack, identifying the bomber as an Iraqi who targeted Shiite Muslims.
ISIS considers members of Iraq's Shiite majority -- including the women and children who were victims of the ice cream shop blast -- to be heretics and thus legitimate targets for attack.
Images and footage posted on social media showed the devastating impact of the blast, which ripped through the crowded area around Al-Faqma ice cream shop in the Karrada district of central Baghdad, scattering rubble across the street.
One photo showed cups of ice cream scattered on the blood-stained ground.
Brett McGurk, the US envoy to the international coalition fighting ISIS, condemned the attack and expressed solidarity with Iraq.
ISIS "terrorists tonight in Baghdad target children & families enjoying time together at an ice cream shop. We stand w/Iraq against this evil," McGurk said on Twitter.
In the second attack, a car bomb exploded near the country's main pension office close to one of the principal bridges over the River Tigris, killing at least 11 people and wounding at least 41.
There was no immediate claim of responsibility, but ISIS frequently carries out car bombings targeting civilians in the Iraqi capital.
Battle for Mosul
The attacks in Baghdad come as Iraqi forces fight to retake the last ISIS held areas of Mosul, a city that was the jihadist group's most emblematic stronghold.
Three neighbourhoods north of Mosul's Old City -- Al-Shifaa, Al-Saha and Al-Zinjili -- are now the target of a broad assault by Iraqi soldiers, police and special forces that was launched last week.
On Tuesday, an Iraqi army officer said that security forces were proceeding slowly in Al-Shifaa in a bid to protect infrastructure.
"The problem is that it is a neighbourhood with four or five hospitals," Brigadier General Shakir Kadhim Mohsen told AFP in Mosul, adding that forces have permission to "take more time to spare the infrastructure and keep the civilians safe."
Mohsen said that ISIS's loss of sites it used to produce mortar rounds and explosives means the jihadists are now running low and mainly relying on "snipers and suicide bombers" to target Iraqi forces.
"There are 50 to 100 fighters moving from one building to another" in Al-Shifaa, he said.
The United Nations has warned that up to 200,000 civilians who are believed to remain in IS-held areas of the city are in grave danger and that large numbers could flee.
"We are deeply concerned that right now, in the last final stages of the campaign to retake Mosul, that the civilians... in (ISIS) areas are probably at graver risk now than at any other stage of the campaign," Lise Grande, the UN humanitarian coordinator for Iraq, told AFP.
She said the UN estimates there are between 180,000 and 200,000 civilians in jihadist-held areas of Mosul, the majority of them in the Old City.
The area -- a warren of closely spaced buildings and narrow streets -- has posed a significant challenge to Iraqi forces.
Families who managed to flee ISIS held areas have told the UN that food, water and medicines are in short supply and that snipers fire on civilians who try to leave, Grande said.
(Except for the headline, this story has not been edited by NDTV staff and is published from a syndicated feed.)