Philipp Lahm, who joined Bayern's junior side in 1995, will remain until 2018 while Muller's deal runs until 2019.
Philipp Lahm and Thomas Muller have signed two-year extensions to their Bayern Munich contracts, the Bavarian giants announced on the eve of the World Cup on Wednesday.
Both are currently preparing for Germany's opening World Cup match against Portugal on June 16 in Group G which also includes Ghana and the United States.
Lahm, who joined Bayern's junior side in 1995, will remain until 2018 while Muller's deal runs until 2019.
"Both the club and my representatives felt it was the right time to discuss a contract extension," said Lahm, who will be 34 when his new deal runs out.
"It will definitely be my last contract. I will end my career with FC Bayern. That was always my wish and I'm delighted I'll be able to fulfill it."
The Munich-native has played 260 Bundesliga matches for Bayern, winning six national titles with the reigning German champions.
Midfielder Muller, 24, who joined the club as an 11-year-old before making his first-team debut in 2008, ended speculation of a possible move abroad.
"I had some great discussions with those in charge at the club, who made it clear that this was the place for me to be," said Muller, who has scored goals in 165 league games since his first pro contract at Bayern in 2008
Club CEO Karl-Heinz Rummenigge said the pair were an important part of the team setup.
"Philipp Lahm and Thomas Muller are both very important building blocks for FC Bayern," added Rummenigge.