His deal had been due to expire in June 2014 and the Germany international was happy to prolong his stay.
“It’s always special to be able to sign a new contract with a club like this, I am very happy about it," he told the club’s official website.
Badstuber has been sidelined with a cruciate ligament injury he picked up against Borussia Dortmund in December last year, but is upbeat about the recovery process and believes the new contract shows the club have faith in him.
“This showed great character and that I had the backing of the club," he continued.
"I'm optimistic, but I must wait and see how the knee reacts. It looks very, very good. I hope that this continues."
Badstuber came through the youth set-up with die Roten and made his first-team debut in 2009-10 season, with the club going on to win the Bundesliga the same year. The 23-year-old also has 30 caps for his country.