The 23-year-old defender has made 67 appearances and scored six goals for the Blades since joining from Brentford in 2016.
O’Connell told the club’s official website: “Once (boss Chris Wilder) spoke about me signing a new deal, I agreed straight away, it was a no-brainer.
“I only see myself improving here and continuing to progress my career.
“This is a big club, we have an excellent group of players who are all winners and a terrific staff who know how to get the best out of us.”
Sheffield United are currently second in the Championship and O’Connell becomes the eighth player to sign a contract extension with the club in recent months.