Carvajal, has won 16 major trophies, including four Champions League and two La Liga trophies and one Copa del Rey since joining Real Madrid in 2013.
Carvajal becomes the next Madrid to extend his stay after Luka Modric, Nacho Fernandez and Lucas Vasquez who all penned a new deal going into the new season.
Having gone through a lot of injuries saw Carvajal making 15 appearances in all competitions for Madrid last season.
Coming back from a long injury, Carvajal is currently training with physical trainer Antonio Pintus to ensure he returns fit when the 2021-2022 kicks off in two weeks.
The right-back could become one of the team captains in the next few years.
Real Madrid will kick start their new La Liga campaign under newly appointed manager Carlo Ancelotti with a trip to Alaves on August 14.
Carvajal couldn't feature for Spain’s European squad for Euro 2020 due to injury as they were eliminated of the last-four by eventual winners Italy.
Madrid have lost their experienced centre-back Sergio Ramos and are also on the verge of losing their key cog at the defence in the shape of French player Raphael Varane who is set to join Manchester United.
The departure of the duo will see Real relying on the services of Eder Militao and Nacho Fernandez at the heart of defence.
And missing out on the LaLiga title last term,the White Angels will do everything they can to deny champions Atletico Madrid from defending the accolade this season.