Dansby agreed to a four-year, $24 million deal that includes $14 million guaranteed, according to sources. Whitner reached agreement on a four-year, $28 million deal, according to sources.
Dansby, who turns 33 in November, had a career year in 2013, his first season back with the Cardinals since leaving to sign with the Miami Dolphins in 2010.
But the Bengals plan to match the offer sheet, which includes $5.3 million in guaranteed money, league sources told Schefter.
The Bengals tendered Hawkins at the original level, but he was an undrafted free agent out of college so there would be no compensation involved. Hawkins played eight games last year and caught 12 passes for 199 yards.
Dansby finished with 113 tackles, 6.5 sacks and four interceptions -- two of which were returned for touchdowns. With the two return touchdowns in 2013, Dansby is tied for third in franchise history with four interceptions returned for touchdowns.
Dansby left Arizona, the team that drafted him in 2004, after spending six years there, the final two of which Dansby was franchised. He landed in Miami for three seasons before Dansby was reunited with former defensive coach Todd Bowles in Arizona last season.
Whitner, 28, is one of the NFL's hardest-hitting safeties. He was a good fit with the 49ers' aggressive, fast-paced defense and was considered one of the leaders of the group.
He signed a three-year deal with the 49ers after the 2011 lockout.
Whitner has said he plans to file paperwork in the offseason to change his last name to Hitner, a statement he is making against the NFL after receiving fines for hits the league deemed to be illegal.
The 49ers reached agreement on a four-year, $23 million deal with safety Antoine Bethea, according to sources.
ESPN.com Cardinals reporter Josh Weinfuss and ESPN.com 49ers reporter Bill Williamson contributed to this report.