With his previous contract running to 2027, Bayern have secured the Belgian to a new extension through to 2029.
Kompany, 39, arrived from Burnley on the eve of the 2024/25 season and won the Bundesliga title in his first season, followed by winning the German Super Cup earlier this term.
Upon putting pen to paper, Kompany commented: "I am grateful and honoured. I want to thank Bayern for the trust and the working environment they have placed in me since day one. It feels like I've been here much longer, and I know the club well. We've embarked on a wonderful journey: let's continue to work hard and celebrate further successes!"
Meanwhile, Bayern president Herbert Hainer said: "Kompany's renewal is a strong sign of confidence in the work done so far and clearly signals continuity and stability for Bayern.
"Vincent is highly regarded by the players, management, and fans, and we are delighted with this early extension."
