Spalletti, who took over in October following the dismissal of Igor Tudor, had initially agreed to a short-term deal. His appointment came during a difficult spell, but Juventus have since shown signs of steady progress.
Club chief executive Damien Comolli praised the Italian's influence, saying: "We are delighted to extend Luciano's contract. Since he joined, he has had an immediate and very positive impact on the players, the club and the entire Juventus community.
"It was clear from the start that he is the right person to lead this team forward and build something strong."
Juventus have improved in Serie A under Spalletti and currently sit fifth with 57 points. They remain firmly in the race for a top-four finish, just one point behind fourth-placed Como, as the battle for UEFA Champions League qualification intensifies.
However, the gap to the title race is significant, with Inter Milan leading on 72 points and Napoli following on 65.
Spalletti arrived in Turin with a strong reputation, having guided Napoli to their first league title in 33 years in 2023. His time with the Italy national team was less successful, ending after a disappointing UEFA Euro 2024 campaign and an underwhelming start to World Cup qualifying.
Juventus now turn their focus to Saturday's crucial league clash against Atalanta, with their Champions League hopes still very much alive.