Jansson started his career with local club Malmö FF before moving to Italy to join Torino.
Jansson played in a variety of positions in the early stages of his career until deciding on centre back in the start of the 2010 season.
Jansson was also mentioned as a potential candidate for becoming the club's new captain as Daniel Andersson announced that he would step down during the 2012 season.
Jansson continued to be one of the club's most important players during the league title winning 2013 season where he played 24 matches and scored one goal.
The goal was an important equalizer against title contender IFK Göteborg in the home fixture on 25 August 2013, Malmö FF went on to win the match 3–1.
On 18 August 2016, Jansson joined English side Leeds United on a season-long loan, where he was handed the number 18 shirt.
[14] After returning to the side following a two-match suspension for accumulating 10 yellow cards, on 25 January 2017 Jansson made his 22nd appearance for Leeds in a 2–0 win over Nottingham Forest.
On 2 February 2017, Jansson signed a permanent deal with Leeds worth £3.5 million which would officially take place when his loan expired at the end of the 2016–17 season.
[23] In August 2018, Leeds rejected a bid of £10 million for Jansson from Russian Premier League side FC Krasnodar.
[26] After helping Leeds to a third-place finish, on 24 April, Jansson was voted into the Championship PFA Team of the Year for the 2018/19 season.
From the restart, Albert Adomah essentially walked the ball into net unchallenged by 10 Leeds players, with only a frustrated and disbelieving Jansson giving chase and nearly dispossessing the forward.
[33] Leeds qualified for the playoffs, but Jansson picked up an ankle injury and missed the first leg versus sixth-placed Derby County at Pride Park.
Leeds took a 0–1 win into the home leg at Elland Road, where Jansson returned to the bench, but was an unused substitute with Gaetano Berardi favoured ahead of him by Bielsa.
[42][43] Jansson played only six games of the 2022–23 season before suffering a hamstring injury in a goalless league tie at Bournemouth on 1 October 2022.
[44] The injury kept him out until the post-World Cup break, when he was an unused sub against Spurs on Boxing Day and then came on at the London Stadium on 30 December as a 95th-minute replacement for the injured Ivan Toney in the Bees' 2–0 win against West Ham.
[47] On 14 April 2023, Brentford announced that Jansson would leave the club at the end of the season, in order to rejoin Malmö FF on a free transfer.
[56] On 18 June, Jansson was named in the starting lineup ahead of Manchester United's Victor Lindelöf for Sweden's opening game of Group F in a 1–0 win against South Korea.
[63] On 25 July 2017, Jansson married his fiancé Åsa Thornell and revealed on his Instagram that at their wedding reception they had a band sing a Swedish version of the "magic hat" song.