With the new extension, Williams is now locked into a contract through the 2017 season. He signed a four-year deal worth $29.15 million before the 2011 season.
Williams, 31, is set to make $4.8 million next season and $7 million in 2016.
He played in 15 games last season, totaling 42 tackles and 5.5 sacks, helping Buffalo rank No. 4 in the league in total defense.
Williams, a four-time Pro Bowler, has spent all nine of his NFL seasons with the Bills, who drafted him in the fifth round of the 2006 draft.
He has 34.5 career sacks, three forced fumbles and four fumble recoveries in 130 games for Buffalo, which has not been to the playoffs since 1999.
- Scooby Axson