The 26-year-old Belgian international joined City from Hamburg in August 2008 and last season led the club to their first league title since 1968.
“For me, if you are good somewhere then there is no reason to look elsewhere,” Kompany told the club’s website.
“Man City is not just a project of the owners or the people employed by the club – it is also my project.”
Kompany, who started out at Anderlecht before his switch to Germany, was bought by City during the tenure of the club’s former manager Mark Hughes.
His arrival came shortly before the takeover of City by Sheikh Mansour, which kickstarted a spending spree at the club that transformed the Etihad outfit’s fortunes.
“I have been here since the beginning and I have seen everything at the club change inside and out,” added Kompany.
“I have the feeling that I have contributed to it too. It is good to know that I can be at City for another six years. It is a compliment that the club feels so highly of me.
“Hopefully, in the future I will have a bigger impact than I already have. I am good here.
“The fans have given me an incredible reception, which is one of the main reasons that I signed this new deal. My family is happy and there are so many more trophies to win at this club – that is why it makes it so special.”
They lifted the FA Cup in 2011 and won last season’s Premier League in dramatic style when an injury-time Sergio Aguero goal against QPRin the final game of the campaign gave them the title on goal difference from rivals Manchester United.
“I have never denied that this can sometimes be the hardest team in the league of which to be captain, but I am all about responsibility and challenge,” said Kompany.
“This Man City project was probably one of the most difficult projects in Europe to be part of and so far we have all done a good job, even though a lot of people said it [success] wasn’t going to happen so quickly.
“I like the kind of characters that we have in our team. I like the challenges we have ahead of us. Now is the time to build the culture of winning. We are in the right time. We are in the right moment.”