Born in Malmö, Sweden, Hammar played in both youth clubs in Sweden at Bunkeflo IF and Malmö FF before joining Premier League side Everton from Malmö FF in July 2010, signing a full-time scholarship with the club. In February 2011, Hammar signed his first professional contract with the club. After spending a year playing in the academy, Hammar made his Everton U21 debut, playing the whole game, in a 4-2 win over Blackburn Rovers U21 on 16 January 2012.
In the 2012-13 season, Hammar began to play for the club's reserve regularly under the Reserve Manager Alan Stubbs. Hammar went on to make eight appearance for the side, including scoring his first goal, as well as, an own goal, in a 5-1 loss against West Ham U21 on 26 August 2012. On 11 February 2013, Hammar joined Stockport County on a one-month loan. He made his debut on 16 February 2013, in Stockport's 0-0 draw with Ebbsfleet United. He made a total of six appearances for the club before returning to Everton.
At the end of the 2012-13 season, without making a first team appearances, Hammar was released on 7 June 2013.
On 18 June 2013 Hammar signed a six months contract with his youth club Malmö FF, where he will join the club on 1 July 2013. Prior to his move to Malmö FF, Hammar was linked with a move to Italian clubs before joining them in favour of his hometown club instead.
Hammar made his debut for the club in the Scanian derby against Helsingborgs IF away at Olympia on 25 September 2013. On 9 December 2013, Hammar signed a new three-year contract with the club.
In his first full season at the club, Hammar found his first team opportunities limited, as centre-backs Filip Helander and Erik Johansson were preferred instead. As a result, Hammar regularly played for the reserve side for the rest of the season instead. But following Johansson's injury, Hammar was given a handful of first team appearances throughout July until his return from injury. As the season progressed, Hammar appeared in the first team, playing on three occasions, but was sent-off on the last game of the season, in a 2-1 loss against Åtvidabergs. At the end of the season, he made seven league appearances for the club and participated in three qualifying matches for the 2014–15 UEFA Champions League.
With his first team opportunities at Malmö FF, Hammar moved to Norwegian side Fredrikstad on loan for the rest of the season. Hammar made his Fredrikstad debut, in the opening game of the season, in a 1-1 draw against Brann. In the next game against Hødd, Hammar provided an assist to set up one of the goals, in a 2-2 draw and scoring his first goal for the club on 23 April 2015, in a 5-1 win over As IL. Hammar then scored his first league goal for the club on 25 May 2015, in a 2-2 draw against Follo. After suffering from an injury, Hammar went on to make twenty-five appearances and scoring two times in all competitions. At the end of the season, he returned to his parent club.
Following his loan spell at Fredrikstad came to an end, Hammar left Malmö FF, to join Örgryte IS, signing a two-year contract.
Hammar played his first game in the Superettan on 3 April 2016 against Ljungskile, which resulted in a 1-1 draw, in the opening game of the season. It wasn't until on 23 July 2016 when he scored his first goal, in a 3-2 win over Degerfors In his first season at the club, Hammar established himself in the starting-eleven and went on to make twenty-eight appearances and scoring once in all competitions. Hammar missed two matches, due to special leave and suspension.
Ahead of the 2017 season, Hammar was linked with a move away from Örgryte IS, with top clubs in Sweden keen on signing him
Hammar was named captain of Örgryte IS ahead of the 2017 season.
After playing once for Sweden U17, Hammar has made several appearances for Sweden U19s. Hammar then made an impressive display against Finland U19 that saw earned Man of the Match on 15 August 2012 and scored his first Sweden U19 goal on 10 October 2012, in a 3-1 win over Wales U19. Hammar went on to make thirteen appearance and scoring once for Sweden U19 side.As of 23 July 2015.
Svenska Supercupen: 2013, 2014