The France international moved to the Spanish capital in 2011 and is the latest player to commit his long-term future to Los Blancos.
Midfielder Marcos Llorente has also renewed until 2021, as the Spanish champions safeguard the futures of their key players.
Varane is an integral member of the Madrid defence and has become a regular alongside Sergio Ramos following the departure of Pepe last summer.
The France international missed a part of the early season through injury but has already made six appearances for Zidane's side in all competitions, per WhoScored.com.
Varane was also part of the Madrid side that beat Borussia Dortmund 3-1 in the UEFA Champions League in midweek, and he played a key role.
The centre-back produced a key intervention to deny Dortmund striker Pierre-Emerick Aubameyang, as shown by Marca:
Real Madrid president Florentino Perez has also suggested that Varane could take over from Ramos as club captain in the future:
Still just 24, Varane is a quick, strong and tall defender with superb ability on the ball and now looks set to be a key figure in the heart of the Madrid defence for many years to come.
Madrid also deserve credit for ensuring their key players are all tied to the club on long-term contracts, which gives clarity and stability to both players and the club.