Stoke boss Gary Rowett said: "We have two very good senior central defenders in Ryan Shawcross and Bruno Martins Indi but I felt it was important we brought in another experienced player to add to the competition for places."
Stoke have now made six signings this summer, with Williams joining new arrivals Benik Afobe, Peter Etebo, James McClean, Tom Ince and Adam Federici.