About 300 students chanted "death to France, death to America" in a western neighbourhood of the capital Kabul, an AFP photographer said.
Nearby hundreds more gathered on a flyover and chanted "death to America" and "long live Islam, long live Afghanistan", another AFP photographer said.
Both demonstrations were peaceful, condemning new Muhammad cartoons published by a French satirical magazine on Wednesday and the low-budget film "Innocence of Muslims" which has triggered protests around the world.
Similar rallies have been held across Afghanistan in the last four days. On Monday, a protest of more than 1,000 residents in eastern Kabul turned violent when the crowd set fire to cars and threw stones at police. About 50 officers were slightly wounded.
Afghanistan is a devoutly Muslim nation and issues seen as an insult to religion are taken very seriously, often with violent consequences. Earlier this year 40 people were killed in street unrest over the burning of copies of the Koran by US soldiers on a base.
France has said that on Friday, the Muslim day of prayer, it will close diplomatic missions, cultural centres and French schools in around 20 Muslim countries for fear of violent protests over the cartoons.