Starting his career at the youth teams of Hvidovre IF, he moved youth setup of multiple Danish champions Brøndby IF. When he was no longer seen as a long-term prospect for the Brøndby goalkeeping position, he left Brøndby in the winter 1999, to rejoin Hvidovre. Andersen made his senior debut for Hvidovre IF in the lower league Danish 1st Division, and was recognized as a big talent.
AB
In March 2002, Hvidovre owner, and professional goalkeeper, Peter Schmeichel chose to end his engagement in the club. Hvidovre actively sought to off-load Andersen, one of only two professional players in the squad. He was initially wanted by a number of clubs in English football, including Schmeichel's club Aston Villa and Sunderland, the club of Danish international goalkeeper Thomas Sørensen. Sunderland opted to buy Norwegian international goalkeeper Thomas Myhre instead, and no other foreign offers materialized. Andersen moved to Akademisk Boldklub in the top-flight Danish Superliga championship in August 2002.
He moved abroad to join English club Charlton Athletic in a DKK 8 million transfer deal in June 2004. In his first season with the London club, he only made two first team appearances. Due to an injury sustained by first choice goalkeeper Dean Kiely, Andersen started the 2005–06 season in the team. Charlton's poor mid-season form saw him dropped in favour of Kiely at first, then Thomas Myhre, who established himself as first choice as Charlton turned their season around. Andersen was reinstated into the lineup for the last two games of the season, when Myhre suffered an injury. In the 2006 summer transfer window, Andersen looked ready to join Leeds United on a season-long loan deal, but as Charlton insisted on a clause to allow the club to recall Andersen at any time during the season, the transfer fell through at the last moment. In the first half of the 2006–07 season, he saw the loaned-in Scott Carson become Charlton's starting goalkeeper.
Brøndby IF
In November 2006, Andersen signed a transfer deal to move back to Denmark to play for Superliga side Brøndby IF at the start of the January 2007 transfer window. He made some errors in his first time at the club, dropping against Odense Boldklub and Viborg FF, but was kept in the starting line-up and eventually upped his game. He helped Brøndby win the 2008 Danish Cup, and was named 2008 Danish Goalkeeper of the Year.
Andersen was called up for the Danish under-21 national team in June 2001, where he immediately displaced the two-years older Rune Pedersen. While at AB, he reached 21 games for the Danish under-21 national team, and was the first goalkeeper to win a Danish talent award, when he was named 2003 Danish under-21 Talent of the Year. Following strong displays for AB, Andersen made his Danish national team debut against Spain in a March 2004 friendly match. It would be four-and-a-half years before he got his second cap. He was selected as a backup goalkeeper for the Danish national team squad at the 2004 European Championship, where Thomas Sørensen was preferred as the starting goalkeeper in every game. While playing for Brøndby, Andersen got his second cap in September 2008, and replaced the injured Thomas Sørensen for three games in the 2010 FIFA World Cup qualification. He was included in the Danish squad for the 2010 FIFA World Cuptournament. After the injured Thomas Sørensen was ruled out of UEFA Euro 2012, Andersen replaced him as the first-choice goalkeeper for the Danish national team.