The bombings in Baghdad and a town south of the capital were the latest attacks by suspected Sunni insurgents trying to reignite sectarian violence and undermine the Shiite-led government.
A recent spike of particularly lethal insurgent attacks comes at a time of anti-government protests by Iraq's disaffected Sunnis, including tens of thousands who rallied Friday in Sunni areas in western and northern Iraq.
Demonstrators blocked Iraq's main highway to Jordan near the city of Ramadi, performing Muslim prayers, the highlight of the religious week. Ramadi is the capital of the Anbar province and a former al-Qaida stronghold that saw some of the fiercest fighting against U.S. forces during the Iraq war.
Protesters have rejected calls by an al-Qaida-linked group that they take up arms against the government, but there is concern militants are trying to exploit mounting Sunni discontent.
Friday's bombings targeted an outdoor pet market in Baghdad's northern Kazimyah neighbourhood and a vegetable market in the Shiite town of Shomali in Hillah province, south of the Iraqi capital.
Every Friday, Iraqis converge on markets to shop and spend family time during the Muslim weekend. Markets are a frequent target for militants who seek to inflict large numbers of casualties.
In Baghdad, the first car bomb exploded around mid-morning at the entrance to the Kazimyah market, two police officers said. When panicked shoppers tried to flee the area, a second parked car exploded a few metres away, according to the officers.
At least 17 people were killed and 45 were wounded in the two blasts, police said. All the victims were civilians.
About an hour later, two car bombs exploded simultaneously at the Shomali market, killing at least 14 people and wounding 26, two police officers said.
Health officials confirmed the casualty figures in each attack. All officials spoke on condition of anonymity as they were not authorized to release information.
Violence has decreased since the worst sectarian fighting in 2006-2007, but insurgents carry out near-daily attacks on security forces and civilians in an attempt to undermine the Shiite-led government.