*Club domestic league appearances and goals, correct as of 17:28, 21 December 2024 (UTC) ‡ National team caps and goals, correct as of 23:13, 12 October 2024 (UTC)
Widmer began his playing career at SV Würenlos and FC Baden before he moved on to FC Aarau where he rose through their youth ranks, soon playing regularly for Aarau's reserve team. He eventually made his league debut on 23 July 2011 against FC Winterthur, starting the match.[3] He scored his first Swiss Challenge League goal in a 2–2 home draw against FC St. Gallen on 21 November 2011.[4]
He signed with Udinese in the summer of 2012, but remained at Aarau for the 2012–13 season.
On 12 July 2018, Widmer signed with Basel[5] for a club record €5.5 million.[6]
Under trainer Marcel Koller, Basel won the Swiss Cup in the 2018–19 season. In the first round Basel beat FC Montlingen 3–0, in the second round Echallens Région 7–2 and in the round of 16 Winterthur 1–0. In the quarter-finals Sion were defeated 4–2 after extra time and in the semi-finals Zürich were defeated 3–1. All these games were played away from home. The final was held on 19 May 2019 in the Stade de Suisse Wankdorf Bern against Thun. Striker Albian Ajeti scored the first goal and Fabian Frei the second for Basel. Dejan Sorgić then netted a goal for Thun, but the end result was 2–1 for Basel.[7] Widmer played in five cup games and scored one goal, the winning goal in the match against Winterthur.[8]
Widmer scored his first international goal for Switzerland on 6 September 2020, in a 1–1 UEFA Nations League draw against Germany.[11]
He was a member of the Swiss squad for UEFA Euro 2020,[12] where he made his tournament debut as a substitute in the second group match against Italy on 16 June. He went on the start the final group match against Turkey, as well as in the round of 16 against France and the quarter-final against Spain.[13][14]
Widmer played in seven of Switzerland's eight 2022 FIFA World Cup qualification matches, scoring in the team's 1–1 draw with Italy on 14 November 2021.[15]
At the 2022 FIFA World Cup finals in Qatar, Widmer started all three of Switzerland's Group G matches, but was unavailable for the team's 6–1 loss to Portugal in the round of 16 due to illness.[16]
Widmer started all three of Switzerland's UEFA Euro 2024Group A matches at right wing-back and was yellow carded in both the 3–1 win against Hungary and the 1–1 draw with Germany.[17] He was suspended for the round of 16 match against Italy, which Switzerland won 2–0 to knock out the defending champions. In the quarter-final against England, he came on as a substitute for Ruben Vargas in the 64th minute and received his third yellow card of the tournament in the 85th minute.[18]