Several hundred students shouted "God is Great" as they rallied outside the offices of the European Union in Aceh province on Sumatra Island. They dispersed after meeting an EU representative outside the gates, witnesses said.
Rowdy protests also were held in Jakarta and at least two other cities across the sprawling country.
Danish missions, which have been repeatedly targeted by protesters, have been shut because of security concerns, said Niels Erik Anderson, the country's ambassador to Indonesia.
"The Foreign Ministry recommends that Danes already in Indonesia leave and that those interested in coming postpone their plans," he said.
The 12 cartoons first appeared in a Danish newspaper in September, but have since been republished by newspapers in several other countries, most of which have claimed to support free speech in doing so.
One of the drawings shows Muhammad wearing a turban shaped as a bomb. Another portrays him holding a sword, his eyes covered by a black rectangle.
Anderson said he did not know exactly how many Danes were in Indonesia. Close to 250 have registered at the embassy, he said, but the number was likely to be much higher.
"My concern is that I have not seen any adequate security measures," he said, adding that some groups have issued threats against Danish citizens. He did not elaborate, reports the AP.
Russian President Vladimir Putin, in his speech dedicated to the Day of the Russian Navy, recalled the threats that Russia is currently facing from a number of countries.