He is currently third in the drivers' championship, after ending last year fifth in the standings with four podiums along with way.
“I am very happy to have renewed my contract with Scuderia Ferrari,” he said.
“I have always said that there is no better Formula 1 team to race for and after over a year with them, I can confirm that putting on this race suit and representing this team is unique and incomparable.
“My first season at Maranello was solid and constructive, with the whole group progressing together. The result of all that work has been clear to see so far season.
“I feel strengthened by this renewed show of confidence in me and now I can't wait to get in the car, to do my best for Ferrari and to give its fans plenty to cheer about.
“The F1-75 is proving to be a front-runner, which can allow me to chase my goals on track, starting with taking my first Formula 1 win.”
The agreement means Ferrari will have the same driver line-up for at least four years straight, with Charles Leclerc's current deal also tying him to Maranello through 2024.
“I have said several times that I believe we have the best driver pairing in Formula 1 and so, with every passing race, it seemed a completely natural step to extend Carlos' contract, thus ensuring stability and continuity,” said team principal Mattia Binotto
“In his time so far with the team, he has proved to have the talent we expected from him, delivering impressive results and making the most of all opportunities.
“Outside the car, he is a hard worker with an eye for the smallest detail, which has helped the whole group to improve and progress.
“Together, we can aim for ambitious targets and I'm sure that, along with Charles, he can play a significant part in fuelling the Ferrari legend and will write new chapters in the history of our team.”
The 2022 season continues this weekend at Imola.