"Having started 27 games in four NFL seasons, Jonathan brings great experience to the interior of our offensive line," Niners general manager John Lynch said. "We look forward to him competing for a starting job at guard, while also bringing a veteran presence to our locker room. Jonathan is a welcome addition to our team."
San Francisco will be the fifth stop of Cooper's career since being selected by the Arizona Cardinals with the seventh overall pick in the 2013 NFL draft.
The 28-year-old North Carolina native signed with the Dallas Cowboys in January 2017 during the team's playoff run and re-signed with the organization two months later for the 2017 season. He has also spent time with the New England Patriots and Cleveland Browns.
He made a career-high 13 starts for the Cowboys at left guard last season. Pro Football Focus graded him as the league's No. 35 overall guard.
In October, Cooper discussed the impact of being consistently reminded about where he got drafted, per Drew Davison of the Star-Telegram.
"It's been one of those of those things where I've honestly had to forget it because people are constantly trying to remind you, but not in a positive fashion," he said. "You were top 10, you haven't done this, you haven't done that. If nothing else, it's just been a motivating factor."
He'll compete with Zane Beadles, Laken Tomlinson and Joshua Garnett for one of the starting guard spots during training camp and the preseason.