The 25-year-old has been one of Stoke's biggest assets in their four-and-a-half seasons in the Barclays Premier League and manager Tony Pulis was desperate to tie him to a new deal.
Pulis said: "It's fantastic for us as a football club. We're really, really pleased to have him.
"He's been the bedrock of what we've been trying to do over the past five or six years and we're really pleased that he's finally agreed."
The two parties have been in talks for a number of weeks, with Shawcross indicating he was ready to sign a long-term deal in November.
The 25-year-old joined Stoke from Manchester United, initially on loan, in 2007 and has gone from strength to strength, making his England debut against Sweden earlier this season.
Shawcross brought his family to the Potters' Clayton Wood training ground today for the signing of the contract, and the defender's three-year-old son Freddie accompanied Pulis to this afternoon's press conference.
The manager said: "It's a long contract, Ryan has to get it right, the football club has to get it right and they've managed to come to an agreement, which is great news for everybody.
"I think the world of Ryan. I think he's a great lad. We've just seen little Freddie in here. They're a great family and they're part of this football club.
"We've signed Asmir (Begovic), we've signed Marc Wilson and now Ryan, Steven Nzonzi's on a long-term contract, so that's four top young players.
"And that's what we want to do - keep improving it, keep getting younger players and players who will grow together at the football club.
"We're not going to do what Manchester City have done, we're not going to do a Chelsea, we have to build gradually and steadily, and that's what we've done over the last five years.
"We'll do it our way, in our fashion. A lot of people don't like it but who cares."