About 500 hardline Islamist protesters have rallied outside Facebook's Jakarta headquarters over the social media giant's decision to ban their online activities.

Indonesia's Islamic Defenders Front (FPI) said Facebook had blocked about 70 of their online groups.

They have given the social media giant until Monday (local time) to lift the bans.

After midday prayers on Friday (local time), the small but noisy group marched from the Al-Azar Great Mosque down one of Jakarta's main roads, before staging the rally outside Facebook's Indonesia office.

Dozens of police and soldiers were on hand to ensure the rally remained peaceful.

About 500 protesters attended the rally. ( ABC News: David Lipson )

In a statement, a spokesperson for Facebook said: "We allow people to use Facebook to challenge ideas and raise awareness about important issues, but we will remove content that violates our community standards.

"Our community standards prohibit organisations and people to promote hatred and violence against people based on their protected characteristics."

Social media has proven crucial in recent years as an organisational tool for political and religious rallies.

Jakarta's popular former governor Basuki Purnama, also known as Ahok, was ousted and ultimately jailed for blasphemy last year after hundreds of thousands of protesters rallied in the city, claiming a speech he made was an insult to Islam.

Religion is expected to play a significant role in campaigning for provincial elections next month.

The contest is seen as a precursor to the 2019 presidential election.