After a minute's silence in tribute to the victims of the week's violence, the foreign politicians left the rally, although Hollande stayed on to meet the families, friends and colleagues of the victims.
Nearly three million people massed in the French capital in answer to a call for national unity after the week’s violence.
“It’s an impressive number of people, densely packed in multiple different streams, unlike usual demonstrations, RFI’s Sarah Elzas reported from the demonstration. “There have been spontaneous cheers and at one point people sang the Marsillaise but no slogans are being chanted.
“What French people do best is take to the streets. This march is a chance for an unprecedented number to show their feelings.”
Europe will "win the challenge against terrorism," Italian Prime Minister Matteo Renzi said as he headed to the march. "We are all French today."
"We in Britain face a very similar threat; a threat of fanatical extremism ... It's a threat that has been with us for many years and I believe will be with us for many more years to come," British Prime Minister David Cameron said in a TV interview on Sunday morning.
Paris was the “capital of the world” on Sunday, Hollande said before joining the rally.
Tens of thousands joined marches in provincial cities, including Lyon, Strasbourg, Perpignan and Saint-Etienne.
About 60,000 demonstrated in the southern port city of Marseille.
There were solidarity rallies in other European cities on Sunday, including Brussels, Berlin and Stockholm.
The presence in Paris of some of the foreign politicians raised eyebrows in some quarters.
Press freedom campaign Reporters Without Borders (RSF) slammed the presence of leaders of countries “where journalists and bloggers are systematically bullied”, including Egypt, Turkey, Russia, Algeria and the United Arab Emirates.
Gabonese opposition politicians would add their country to the list, criticising President Ali Bongo's presence.
"We think that it's a joke," Paul Gondjout, deputy head of the opposition National Union party told RFI. "Mr Bongo has taken advantage of this event in Paris to take the opportunity to be among other heads of state around President Hollande and with the people of France. But in our understanding it's a joke because Mr. Bongo here in Gabon doesn't do anything for freedom of speech."
Israeli Prime Minister Benjamin Netanyahu sparked controversy with a statement issued on Saturday night that appeared to urge French Jews to emigrate.
"To all the Jews of France, all the Jews of Europe, I would like to say that Israel is not just the place towards which you pray, the state of Israel is your home," he said.
The four Jews killed at a Paris kosher supermarket on Friday are to be buried in Israel on Tuesday, a source told the AFP news agency.
Hollande met French Jewish leaders Sunday morning and promised greater protection for schools and synagogues, if necessary by the army.