F1 boss Bernie Ecclestone said in October he had reached a commercial agreement with the Italian company.
But governing body the FIA only signed its contract with Pirelli recently, after resolving issues to do with the company's responsibilities in F1.
The sport is changing car design significantly next year, including introducing wider tyres.
Hamilton dominates European GP practice
Pirelli was insisting on a number of in-season testing days to ensure it could properly develop the tyres F1 needed for next season.
And after drivers complained that the current tyres were not to their liking, Pirelli asked the FIA for a 'target letter' defining what was required of it.
This letter dictates that tyres for 2017's faster cars must allow drivers to push flat out for much of the race, which is not the case at the moment.
The current Pirelli tyres have high levels of thermal degradation, which means if they go beyond a certain temperature they lose grip, which never returns.
The key points of the target letter define that:
The FIA feels that these requirements will guarantee Pirelli has to produce a product more like one that would be considered a normal racing tyre - one on which the requirement for management by driving under the limit to control thermal degradation is greatly reduced, and drivers can therefore push hard throughout a race.
On-track testing of 2017 tyres will start in August.
Subscribe to the BBC Sport newsletter to get our pick of news, features and video sent to your inbox.
Pirelli has formally announced it will remain as Formula 1's tyre supplier until the end of 2019.