The move gives Williams a little more money upfront after he sat out the entire 2019 season and gave up his salary from Washington.
Williams was set to make a base salary of $12.5 million in the final year of his deal.
After San Francisco traded for Williams from the Redskins, the two sides plan to play out the 2020 season before evaluating a potential extension.
Williams, 31, is a former first-round pick of the Redskins back in 2010. He currently in the final year of his five-year, $66 million contract that includes $43.25 million guaranteed and stands to make a base salary of $12.5 million for the 2020 season.
In 2018, Williams started 13 games for the Redskins. Pro Football Focus rated Williams as the No. 21 tackle out of 80 qualifying players.