Plans for universal chargers for devices sold across the European Union have been approved by MEPs.
By the end of 2024, all mobile phones, tablets and cameras sold in the bloc will have to be equipped with a USB Type-C charging port.
The same obligation will extend to laptops from the spring of 2026.
Buyers will also be able to choose whether to purchase a new device with or without a charger.
The new law was adopted on Tuesday with 602 votes in favour, 13 against and eight abstentions.
It is part of a broader EU effort to reduce e-waste and to help consumers to make more sustainable choices.
All devices that support fast charging will also now have the same charging speed - allowing users to charge their devices at the same speed with any compatible charger.
Dedicated labels will inform consumers about the charging characteristics of new devices, making it easier for them to see whether their existing chargers are compatible.
Re-use of chargers
The European Parliament has said the changes will lead to more re-use of chargers, and will help consumers save up to €250 million a year on unnecessary charger purchases.
Disposed of and unused chargers account for about 11,000 tonnes of e-waste annually in the EU.
The new rules will not apply to products placed on the market before the date of application.
US tech giant Apple has previously spoken out against the plans for a common charger, claiming it would "stifle innovation".
This move will force Apple to remove their lightning port, and replace it with a USB-C connection.
Future-proof law
Maltese MEP Alex Agius Saliba said this has been a long time coming.
"We have waited more than 10 years for these rules, but we can finally leave the current plethora of chargers in the past.
"This future-proof law allows for the development of innovative charging solutions in the future, and it will benefit everyone - from frustrated consumers to our vulnerable environment.
"These are difficult times for politics, but we have shown that the EU has not run out of ideas or solutions to improve the lives of millions in Europe and inspire other parts of the world to follow suit", he added.