Kobel is the first signing in the Marco Rose era at Dortmund, and will compete with fellow Swiss goalkeepers Roman Bürki and Marwin Hitz for the No.1 spot heading into the 2021/22 season.
"Borussia Dortmund is one of the largest and most famous football clubs in the world," Kobel told BVB's website. "A club that claims to fight for the championship title and the DFB Cup every year and to play in the Champions League. It makes me proud to play for BVB. I would like to contribute my part to the future Dortmund success."
The 23-year-old former Hoffenheim shot-stopper impressed with promoted Stuttgart during their first season back in the top-flight in 2020/21. Only Arminia Bielefeld's Stefan Ortega and Augsburg's Rafal Gikiewicz made more saves in the Bundesliga, while Kobel kept five clean sheets in his 33 league appearances.
"We're very happy that Gregor Kobel has chosen Borussia Dortmund," said Dortmund's sporting director Michael Zorc. "We see great potential in it. Gregor's single-mindedness, ambition and his consistency are remarkable, the profile of his goalkeeping game suits us."
Kobel is a former Hoffenheim player who spent the second half of the 2018/19 season on loan at Augsburg before joining Bundesliga 2's Stuttgart for the next season, which saw them earn promotion to the Bundesliga. Kobel made a permanent switch last summer and is now on the move once again coming to the Signal Iduna Park.
Kobel will be part of Switzerland's Euro 2020 squad this summer, while Dortmund's other goalkeepers Bürki and Hitz were not selected.