The 26-year-old forward, who was a restricted free agent, avoided a salary arbitration hearing which had not been scheduled.
Sanford scored 16 points (10 goals, six assists) in 52 games for the Blues last season and did not score a point in four Stanley Cup Playoff games.
Selected by the Washington Capitals in the second round (No. 61) of the 2013 NHL Draft, Sanford has scored 74 points (38 goals, 36 assists) in 209 regular-season games with the Blues and Capitals and eight points (two goals, six assists) in 25 playoff games. He won the Stanley Cup with the Blues in 2019.
Forward Jordan Kyrou agreed to terms on a two-year, $5.6 million contract ($2.8 million AAV) with the Blues on Tuesday. The 23-year-old, who was a restricted free agent, scored 35 points (14 goals, 21 assists) in 55 regular-season games and one goal in four playoff games.
"Obviously, with the Blues and the organization, all the staff, we have a really good connection with each other," Kyrou told the St. Louis Post-Dispatch on Tuesday. "We feel really good about each other. I'm obviously excited to be back for sure. ... I love playing for St. Louis."
Selected by St. Louis in the second round (No. 35) of the 2016 NHL Draft, Kyrou has scored 47 points (19 goals, 28 assists) in 99 regular-season games and one goal in nine playoff games.
"Coming into last season, my biggest thing was I wanted to be consistent, be a consistent player in the lineup," Kyrou said. "I feel like I made good strides last year. This year I've got to do the same thing."
St. Louis previously agreed to terms with forward Pavel Buchnevich on a four-year, $23.2 million contract ($5.8 million AAV) on July 27, signed forward Brandon Saad to a five-year, $22.5 million contract $4.5 million AAV) on July 29, and agreed to terms with forward Ivan Barbashev on a two-year, $4.5 million contract ($2.25 million AAV) on July 30.
Forward Robert Thomas is the remaining unsigned restricted free agent on the Blues roster.