The 23-year-old Belgian's previous deal was due to expire this summer.
Boyata has been with City since 2007 and can therefore be registered as a home-grown player in the Premier League and Champions League.
That made retaining him an attractive proposition as the club look to stay within the quotas.
Boyata was a regular in Manuel Pellegrini's squads last season but made just six first-team appearances.
Only one of them was in the Premier League with the rest in domestic cup competitions, which included a red card at Blackburn in the FA Cup third round
Boyata has twice been loaned out during his time with City, to Bolton in 2011-12 and FC Twente the following season.
Source : PA