The EU previously agreed new portable electronic devices would have to use a USB Type-C charger by autumn 2024.
Now the law has entered the EU's Official Journal, and with it an exact date has been set for the requirement.
Companies like Apple, whose iPhones use an Apple-made charger, will not be able to sell new devices in the EU after the date unless they use a universal cable.
Apple is the biggest manufacturer to use a customised charging port which is exclusive to some of its products. Its iPhone series uses its own Lightning connector, for example.
Greg Joswiak, Apple senior vice president of worldwide marketing, previously told the Wall Street Journal the tech giant would "obviously" comply with the law.
The new rule will cover a range of "small and medium-sized portable electronics", according the EU, such as phones, tablets, headphones, and handheld game consoles.