The 28-year-old Wales international, who has 28 caps for his country, had opportunities to move elsewhere but decided to stay put in his homeland in order to ensure he stayed in contention to remain in national team coach Warren Gatland's plans.
Williams, who has made 151 appearances for the first-team, has followed the likes of Josh Turnbull, Blaine Scully and Seb Davies in opting to stay with the Blues, where he came through the youth ranks.
He said: "I wanted to remain in Wales, that's the best thing for me and I'm very happy at the club - I have some of my best mates beside me and I feel it's a really strong team with a lot of optimism.
"It was always the case that if I was staying in Wales then I wanted to stay here at the Cardiff Blues.
"I'm really happy to have signed a new deal. We managed to get it over the line the other day and I'm pleased it's done and looking forward to the future."
Williams added: "There's a lot of potential here, it's the capital city region, brilliantly located and the most important thing is the people in the building.
"Over the last six months we've seen yet another great crop of youngsters behind the others, it feels like it is a constant stream, which is great for the club."