Mata is a Spanish international, having represented Spain at under-16, under-17, under-19, under-20, under-21, Olympic and senior levels. He played for the under-20 side in the 2007 FIFA U-20 World Cup. In June 2009, Mata played at the 2009 FIFA Confederations Cup, his first senior tournament. On 9 September 2009, Mata scored his first goal for the senior team, against Estonia, securing the nation a place at the 2010 FIFA World Cup in South Africa, and was part of Spain's World Cup-winning squad. In 2011, he went back to playing in the under-21 side, helping Spain win the 2011 UEFA European Under-21 Football Championship in Denmark. He won the Golden Player award and was part of the Team of the Tournament. Mata returned to the senior squad for UEFA Euro 2012 and, after coming on as a substitute, scored Spain's fourth goal in the final as Spain defeated Italy 4–0 to retain their title as champions of Europe.