Baldock was a key member of the United side which reached the Premier League last season and has started the new campaign in impressive fashion.
His existing deal was due to expire next summer, but he has now been rewarded with fresh terms.
The 26-year-old was linked with a move to Glasgow giants Celtic earlier this summer, but the Blades were always reluctant to the prospect of potentially losing the former MK Dons full-back, who has impressed since joining the club in 2017.
In the wake of the interest from north of the border, the club firmed up moves to keep him at Bramall Lane and have now acted swiftly to finalise a deal with the Buckingham-born player.
On his new deal, Baldock said: "The club is going places and I want to be part of it, it was as simple as that really when it came to the new deal.
"I am absolutely buzzing, I love the city and I am really in amongst it. I am excited about the future and what it could hold.”
Meanwhile, Blades midfielder Oliver Norwood has called time on his international career with Northern Ireland at the age of 28 and will now continue solely on his club career.