The centre-back played 48 times for Steve Bruce's side as they were promoted to the Premier League after joining from Manchester United in January 2011.
"It's nice to get the paperwork out of the way," the 24-year-old told the club's official website.
"I'm happy here and I've got a great relationship with the rest of the lads. I also enjoy living in this area.
"This is the perfect situation."