According to reports, the four-year extension is worth $26 million with incentives.
Williams made the move from cornerback to safety in 2013, recording 82 tackles with 11 pass breakups and four interceptions in 14 starts.
"Aaron Williams is a versatile player who has grown into a key playmaker for our defense in recent years," Bills general manager Doug Whaley told the Bills' website. "He had an extremely productive season for our defense in 2013. Aaron is the type of young, core player we targeted early in the process to retain for years to come and this will be our philosophy moving forward."
Since being selected by the Bills in the second round of the 2011 NFL Draft, Williams has posted 146 tackles, 23 pass breakups and five interceptions.
Fellow safety Jairus Byrd is a free agent.