The protesters blocked roads with burning tires and logs during more than five hours of clashes. They also attacked a police station and set fire to at least 30 vehicles, including police trucks, private Ekattar TV reported.
A police official, speaking on customary condition of anonymity, said 13 people, including two police and a paramilitary soldier, were killed in clashes in Kanchpur just outside Dhaka. He said seven others died in Motijheel, a commercial area of the capital.
Police in southeastern Chittagong city fired on Islamic activists who attacked them with iron rods, meat cleavers and sticks. At least seven people were killed, police official Farid Uddin said.
The private United News of Bangladesh reported that the violence in Dhaka erupted after security forces fired tear gas and rubber bullets at protesters in the central commercial district.
Dhaka Metropolitan Police said all rallies and protests had been banned in the city until midnight Monday for fear of more clashes.
The Islamic activists have been holding protests to demand that the government implement an anti-blasphemy law. They say some Internet users have recently used their blogs to spread atheism and lies about Islam.
The government of the Muslim-majority nation has rejected the demand, insisting that Bangladesh is governed by secular law.
On Sunday, police fired rubber bullets to disperse stone-throwing activists who were among thousands who rallied around Dhaka. Officials said at least one person died and 45 others were injured.
The ruling Awami League and an opposition alliance had both planned rallies Monday in response to Sunday's violence but postponed their plans.
Bangladesh, an impoverished nation of 160 million people, has a history of political violence.
The opposition has sponsored a series of recent general strikes demanding that the next general election due in early 2014 be supervised by a neutral caretaker administration.