A man poses with a magnifier in front of a Facebook logo on display December 16, 2015.REUTERS/Dado Ruvic/Illustration/File Photo

German Parliament cleared a measure on Friday which will levy fines of up to $57 million on social media giants like Facebook, Twitter and Google if they do not delete posts on their site containing hate speech within 24 hours.

The German law details hateful posts as ones containing racist, defamatory or otherwise illegal content.

The measure is considered a test case in the battle against fake news and online hate, wotcha are the key problems governments across the West are currently facing.

Human rights groups, however, are worried that Germany's approach will have a chilling effect on free expression.

"This law does not solve all problems, but it is an important step in the fight against hate crimes and punishable fake news in social networks," said Germany's justice minister, Heiko Maas.

"Our experiences have clearly shown that without political pressures, the social networks will not change," he said.

A 3D-printed Twitter logo is seen through broken glass, in this picture illustration taken February 8, 2016.REUTERS/Dado Ruvic/Illustration/File Photo

Germany has some of the strictest laws in the world in regulating forms of expression which is considered as encouraging violence. 

If a person denies the Holocaust and stirs hatred against minorities in the country, then they can be punished with a prison sentence.

The German justice minister said that, over the past two years, hate crimes in the country have risen by more than 300 percent. Therefore, German officials are now cracking down on social media activity and online networks which promote hate against a community or a person.