No one immediately claimed responsibility for the attacks, but Sunni Muslim insurgents have been redoubling their efforts to undermine the Shi'ite-led government and spark deeper intercommunal fighting since the start of the year.
Two car bombs, one parked near a crowded restaurant and the other close to a football stadium, exploded around sunset and killed at least 18 people in Baghdad's southern Shula district.
Violence in Iraq is increasing as Sunni opposition swells against Shi'ite Prime Minister Nuri al-Maliki, whose power-sharing government has been all but paralysed since U.S. troops withdrew in December 2011.
Another car bomb and six roadside explosive devices planted at a market killed four other people in mainly Shi'ite Mahmoudiya, also in the south of Baghdad.
"I was inside my shop when the explosion happened," said photographer Ibrahim Jassam. "There were a groom and his bride preparing to have their wedding picture taken. They left everything and ran away after the blast. I hid in my shop."
A curfew was imposed on the area following the attacks.
Tens of thousands of Iraqi Sunnis have staged protests against Prime Minister Nuri al-Maliki's Shi'ite-led government in their western stronghold of Anbar on the border with Syria, and al Qaeda has urged them to take up arms.
Al Qaeda-linked militants appear to be regrouping in Anbar's caves and valleys, with some moving into Syria to join the fight against Assad, whose Alawite sect springs from Shi'ite Islam.
Iraq is calmer than in the communal bloodletting of 2006-2007, but Shi'ite leaders fear the war in neighbouring Syria could push the country back towards sectarian strife.
© Thomson Reuters 2013