For Sweden, Andersson made 83 appearances and scored 31 goals, both near the top in national history. He played in the 1992 and 2000 European Championships. He led the Swedish team in scoring with five goals in the 1994 World Cup, a feat which tied him for third place as the tournament's leading goalscorer. His physical size gave him an advantage in the air, and in this tournament he became known for towering over defenders to score goals with his head; in Sweden's quarter-final win over Romania, he headed in a vital goal by outjumping even the Romanian goalkeeper.