Kimmich's existing deal had been due to run out in the summer of 2020.
A Bayern player since 2015 when he signed from RB Leipzig, the versatile 23-year-old has emerged as a successor to Philipp Lahm following the captain's retirement last season.
"I am very happy to extend my contract so early. This shows that the club and those responsible show me a lot of trust and see me as an important element for the long-term sporting success of Bayern in the future. That makes me proud!" the player said.
"I am grateful for the fact that I have been able to continuously develop at the highest level and can do so in the future," he continued.
"My goals and those of the club for the years to come are very ambitious and I want to do my part and do everything in my power to achieve them with the team."
Chief executive Karl-Heinz Rummenigge declared, "Joshua has become a mainstay of our team over the past two and a half years we are very happy that we were able to retain him in the long term. Due to the very positive development in the position of right-back, Bayern has made a seamless transition into the future."
(You may also be interested in 'Bundesliga Veteran Claudio Pizarro Continues Remarkable Scoring Run After First Goal of 2018')