Johnson, who has been capped 54 times by England, spent six years at Liverpool following spells at West Ham, Chelsea and Portsmouth.
He moves to the Potteries after being out of contract at Liverpool.
Speaking from the Far East, where the club are on a pre-season tour, Stoke manager Mark Hughes told the club’s official website: “Glen will be a fantastic addition to our squad.
“He commanded a huge transfer fee when he left Portsmouth for Liverpool (£18m) but dealt with the pressure that comes with that.
“He’s a talented defender who also chips in with goals as we discovered last season when he scored the winner against us at Anfield.
“Having spoken to him I know how much he’s looking forward to being a Stoke player.”
Stoke’s chief executive Tony Scholes added: “Glen’s record speaks for itself. He has a wealth of experience having been a regular at international level for more than a decade.
“There was no shortage of clubs interested in him after he left Liverpool but he very much sees his future as a Stoke City player and we are delighted he has chosen to join us.”
Johnson becomes Stoke’s sixth signing of the summer and has already arrived in Singapore to meet up with his new teammates ahead of the Barclays Asia Trophy.