Nilsson represented Sweden at the 2010 World Junior Ice Hockey Championships which were held in Saskatchewan, Canada. He only played in one game during the tournament, as Jacob Markström was the starter. Sweden won a bronze medal at the tournament. He won a gold medal with Team Sweden at the 2018 IIHF World Championship.