The 49ers are signing cornerback B.W. Webb to a one-year deal, his agent, Sunny Shah, announced on social media.
Webb recently worked out for the team.
The Cowboys made Webb a fourth-round choice out of William & Mary in 2013. He also has spent time with the Steelers, Titans, Saints, Browns, Giants and Bengals.
He has not played in the NFL since 2019.
Webb, 31, has played 80 games with 35 starts, totaling 164 tackles, a sack, 27 pass breakups, four interceptions and a forced fumble.