The European Union flag is seen with Google's logo.

European parliamentarians have passed a controversial overhaul of copyright law that could force tech giants to install filters that prevent copyright-protected content from being uploaded.

Lawmakers in Strasbourg, France, voted on Wednesday in favor of the European Union's revamped directive, which is aimed at bringing the bloc's rules on copyright into the 21st century.

The copyright reform was passed with 438 votes in favor, 226 against and 39 abstentions.

But critics say such a law would normalize censorship and restrict internet freedom, preventing users from being able to post content ranging from memes to links to articles from news outlets.

The controversy mainly surrounds two sections of the law — Articles 11 and 13.

Article 11 would grant press publications copyright over the sharing of their content online, meaning they would be able to charge services like Google News for aggregating their stories. Critics have dubbed this as an effective "link tax," but proponents say hyperlinks will be exempt.

Meanwhile, Article 13 calls for "effective content recognition" technology to filter out copyright-protected content. Detractors hold that this part of the law could threaten social media users' ability to share anything from internet memes to snippets of music and film.

Member of the European Parliament Axel Voss — a key supporter of the directive — said parliament had addressed concerns raised by activists, citing amendments including the exclusion of "small and micro platforms or aggregators" from the scope of legislation.