Mertesacker, 29, has established himself as a first-team regular since signing from Werder Bremen in August 2011, while 33-year-old Rosicky is now in his eighth season at the club.
Arsenal did not disclose the length of either player’s contract extension.
“We are delighted that Mertesacker and Rosicky have committed their futures to the club,” said manager Arsene Wenger.
“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 has made 110 appearances for Arsenal, scoring five goals, and has captained the team this season in the absence of Thomas Vermaelen and Mikel Arteta.
“It was easy for me to commit myself to the club,” said the Germany international, who also published a picture of himself wearing an Arsenal shirt as a child on his Twitter account.
“I have been here for two and a half great years and feel I have great support from everyone at the club and the fans. I’m really looking forward to having more years coming up with this fantastic club.”
Arsenal are currently four points behind leaders Chelsea in the Premier League with 10 games of the season remaining.
They are due to face Everton in the quarter-finals of the FA Cup on Saturday and trail Bayern Munich 2-0 after the first leg of their last 16 tie in the Champions League.