The former Middlesbrough defender joined the club in August 2016 on a free transfer from Aston Villa an played a major role in their promotion-winning campaign last season, starting 38 of their 46 Championship games.
The 28-year-old joins Junior Hoilett and Neil Etheridge in committing his future to the club and speaking to Cardiff's official website, he couldn't hide his delight.
"I'm really happy. It got sorted out very quickly, so now I can just concentrate on my football," he explained.
"I think we've got a good squad and the manager has signed some good, young and hungry players. There is no pressure on us really and we can just go out and enjoy it.
"I just can't wait to get the season going. It will be nice to meet the new lads, hopefully have a good pre-season down in Cornwall and then get stuck into it."
Ken Choo, the club's executive director and chief executive was similarly pleased, saying: "Joe has performed admirably for the club since we welcomed him here two years ago.
"He seemed to reach another level in our promotion-winning season."
July 3, 2018