The new deal will keep the highly-rated midfielder at Juventus until the summer of 2021. Juventus will also have the option of extending it for an extra year.
The 31-year-old as linked with move to both Paris Saint-Germain and Liverpool during the summer.
Khedira said on Twitter: “I am proud to announce that I have just extended my contract with Juventus until 2021.
“I am very proud to be part of the great history of the Juventus team and family. We continue to make the bianconeri history!”
Khedira joined Juventus from Real Madrid in 2015 and has gone on to win three Serie A titles with the Old Lady.