Mertesacker has established himself in the club's defence since joining from Werder Bremen in August 2011, making 111 appearances for the club.
Rosicky is in his eighth season with Arsenal and has featured 209 times since joining from Borussia Dortmund in 2006.
"We are delighted that Mertesacker and Rosicky have committed their futures to the club," Arsene Wenger told the club's website.
"They are players of exceptional quality and experience, and have consistently proven themselves at the highest level. There is a great feeling of togetherness and belief in the group and this news will only help to strengthen this further."
Mertesacker said: "It was easy for me to commit myself to the club. I have been here for two-and-a-half great years and feel I have great support from the fans. We have a great team here and we all want to do our best to win trophies.
"I have become a real Gunner... I am truly thankful to the club and all the supporters for the time I have had here so far.
"And today I am deeply proud to have extended my contract with Arsenal. I'm proud to be a Gunner."
With the club-record signing of Mertesacker's compatriot Mesut Ozil in the summer, and the emergence of Aaron Ramsey and Jack Wilshere in recent times, Rosicky was widely expected to be the man who missed out on playing for Arsenal on a regular basis.
But the Czech Republic star has appeared 27 times across all competitions this season and is aiming to pick up his first Premier League crown with Arsenal.
Rosicky said: "I'm very happy that I'm staying at the club. I'm proud that I'm still here after a long time and that it still continues.
"One big factor is that I want to win the league with Arsenal. It's my big goal and I will do everything that I can to achieve it.
"Arsenal is a great club, we have a great spirit here and we are all working together to do the best we can."
Wenger's side currently sit third in the table and are four points adrift of leaders Chelsea having fallen to a 1-0 defeat at Stoke last weekend.