The new four-and-half-year contract will keep Williams at Middlesbrough until the summer of 2016.
“I’ve always said I wanted to stay,” Williams said.
“I’m happy here and that’s the main thing. I’m settled and get on well with the manager and the lads.
“I’ve no reason to leave except for my dream of playing in the Premier League – and I want to get there with his club.
“My fiancee has settled here, I know the town and have a lot of friends here. I couldn’t be happier, to be honest.”
“Rhys is an important cog as we move forward trying to build a team to get us into the Premier League,” Boro boss Tony Mowbray said.
“This is an important statement from the club to try to tie down one of the players we feel we can move forward with.”