The contract was filed with the NFL and NFL Players Association, but the 49ers didn't announce it until Thursday night, saying it runs through the 2015 season.
San Francisco gave Boone a $1.7 million signing bonus late last month in keeping the second-year pro off the free-agent market.
Boone will make $450,000 in 2012, $540,000 in 2013, $950,000 in 2014 and $1.2 million in 2015. He also received $940,000 in roster/base salary guarantees, another $600,000 in roster bonuses and $3 million in escalators, so the new money in the contract is $6 million, with the potential for a maximum of $9 million.
Boone doesn't start for the 49ers, but the team is intent on keeping depth and quality on its offensive line.
"We are very pleased with the progress that Alex has made since joining the team in 2009," 49ers general manager Trent Baalke said in a statement released by the team. "He really is a great example of what hard work, dedication and focus can do to further a young player's career. The 49ers are very happy for Alex and look forward to him capitalizing on this opportunity."