The law obliges platforms and search engines to remove offensive content – incitement to hate or violence and racist or religious bigotry – within 24 hours or risk a fine of up to €1,25 million.
The bill was adopted by a show of hands in the lower house National Assembly. Right-wing parties voted against while socialists mainly abstained.
It had in February passed through the upper house senate, where senators
had registered their opposition to the 24-hour rule.
Critics say the proposal will make Google, Amazon, Facebook and Apple the custodians of freedom of expression.
The law was the first with no link to the ongoing coronavirus emergency to be voted on in the National Assembly, where President Emmanuel Macron's party holds a majority, since the epidemic hit France.
An extension of Macron's vow to battle racism and anti-Semitism propagated via the internet, the bill was first submitted to parliament over a year ago.
It has since been amended several times in response to criticism and comments, including from the European Commission which demanded a clearer definition of what kind of content would be criminalised.
The draft has drawn criticism from watchdog bodies in France that have expressed concerns over potential violations of the right to freely express oneself on the world wide web.
Digital companies are worried about fines or legal battles that may result from the new onus placed on them to determine what content violates the bill, and then withdraw it within the given timeframe.
In another controversy, Laetitia Avia, the MP from Macron's party who proposed the bill, has faced accusations by the Mediapart online newspaper of “repeatedly humiliating” five former staff members and using sexist, homophobic and racist language.
She has denounced the accusations as “lies” and said that she will sue for libel.