Bardsley decided not to extend his lengthy Black Cats stay and will officially join the Potters on July 1 after his deal expires at the Stadium of Light.
The full-back has been at Sunderland since 2008, moving to Wearside from Manchester United, and finishes with 200 appearances and 11 goals.
He ended a difficult final season at the club on a high after playing his part in a dramatic escape from relegation.
Paolo Di Canio had frozen out the defender during his spell in charge, but he was recalled by the Italian's successor Gus Poyet and repaid his faith in the closing months.
The 28-year-old was a regular in the side as Sunderland mounted a late survival push, eventually finishing in 14th place, four points clear of the drop-zone.
Poyet re-opened contract talks with Bardsley in a bid to keep one of his experienced performers, but he will link up with Stoke boss Mark Hughes later in the summer.
Reflecting on his first summer signing, the Welshman told Stoke's official website: "I'm really pleased to bring Phil in to the club.
"He's a player of great Premier League experience who I think will bring added quality to the squad.
"He has plenty of qualities that will improve us and help move the football club forward to where we want to be.
"Phil was genuinely excited to join and I'm delighted to bring him in as his personality and desire will shine in the dressing room."