The new rules were backed by a majority of the bloc's governments on Monday, after they were passed by the European Parliament in Brussels last month.
Nineteen countries, including France and Germany, backed the Copyright Directive, while Belgium, Estonia and Slovenia abstained. Finland, Italy, Luxembourg, the Netherlands, Poland and Sweden opposed the changes.
Online platforms will now have to sign licensing deals with individuals, companies or organisations to use their work online.
European Commission president Jean-Claude Juncker said: “With today's agreement, we are making copyright rules fit for the digital age.
"Europe will now have clear rules that guarantee fair remuneration for creators, strong rights for users and responsibility for platforms.
"When it comes to completing Europe's digital single market, the copyright reform is the missing piece of the puzzle.”
EU member states have also adopted new rules to make it easier for European broadcasters to make certain programs on their online services available across borders.
Since 1 April last year, Europeans who buy or subscribe to films, sports broadcasts, music, e-books and games in their own countries can access this content when they travel or stay temporarily in another EU country.
The rules will now be published in the official journal and member states given two years for implementation.