De Gea’s previous contract would have expired at the end of the season and he would have been free to negotiate with foreign clubs from January 2020.
The 28-year-old’s new deal will reportedly earn him £375,000 a week, making him the world’s highest paid goalkeeper.
De Gea joined Manchester United from Atletico Madrid in 2011 and he has won Manchester United’s player of the year four times in the last six seasons.
"It has been a privilege to spend eight years at this great club and the opportunity to continue my career at Manchester United is a genuine honour," De Gea told the Red Devils’ official website.
"Since I arrived here, I could never have imagined I would play over 350 games for this club. Now my future is fixed, all I want is to help this team achieve what I believe we can and win trophies again, together.
"I am committed to continue repaying the fans for all of the care that they've shown me during the good times and the bad."
De Gea has won one Europa League title, one Premier League, one FA Cup and one League Cup during his time at Old Trafford.
He has started all five of United’s Premier League games so far this season, and has kept two clean sheets.
De Gea had a difficult time between the sticks towards the end of the 2018/2019 season but he still remains one of the best players in his position worldwide.