His contract at the Etihad was due to expire next year, but he will now remain with the club until 2026.
The 27-year-old re-established himself in City’s title-winning last season, and was part of the England side that made it to the final of Euro 2020.
It had looked as if Stones was set to leave the club after falling behind Aymeric Laporte and Ruben Dias.
Stones has made 168 appearances and won every domestic trophy since joining the club for £47.5m from Everton in August 2016.
The defender said he could not be happier and working with manager Pep Guardiola was a “dream”.
“I love being part of this squad,” said Stones.
“There are so many quality players here and I know we can continue winning trophies, which is my main focus.”
City’s director of football Txiki Begiristain said Stones had “really matured” since joining the club.
“John is an exceptional footballer and a fantastic defender, whose attributes are well suited to our style of play,” he said.
“We knew when we signed him that we were getting a talented centre-back, but he has really matured in his five years here and, as we saw last season, is at the top of his game right now.”
Stones went on to form a strong partnership with Dias in the heart of City’s defence last season, and he was also named in the 2021 PFA Team of the Year.