Viviano was the first-choice goalkeeper for Italy at the 2005 FIFA World Youth Championship. He was a part of the Italian squad that took part at the 2007 UEFA European Under-21 Championship. He made another appearance for the national U-21 side in a friendly against the Dutch U21 side on 5 February 2008 in preparation for the upcoming Olympics. Viviano went on to play at the 2008 Summer Olympics with Italy. The Olympic team was primarily composed of players from the Italy U21 side that took part at the 2007 European Under-21 Championship side, but who would no longer be eligible to play in the 2009 edition of the tournament. Viviano did not take part in the 2008 Toulon Tournament, however, a warm-up tournament before the Olympics. At the 2008 Olympics in Beijing, Italy reached the quarter-finals, where they suffered a 3–2 defeat to Belgium; during the match, Viviano was sent off in the 80th minute for a reactionary foul on Kevin Mirallas, after the latter had kicked the ball at him when play had stopped following Dembélé’s goal, which took Belgium into the lead, and ultimately proved to be the match–winner. After receiving his first senior call-up on 6 August 2010, ahead of Italy’s friendly against Ivory Coast on 10 August, Viviano made his debut for Italy senior team on 7 September, during a UEFA Euro 2012 qualifying match, in a 5–0 victory against the Faroe Islands in Florence. At that time he became the second choice goalkeeper for Italy, only after veteran Gianluigi Buffon and ahead of Salvatore Sirigu, starting in Italy’s October European qualifiers against Northern Ireland in Belfast (0–0) and Serbia in Genoa, with the latter match being abandoned after only seven minutes of play due to crowd trouble, after flares had been thrown by the fans onto the field, with one almost hitting Viviano; as result, Italy were handed a 3–0 victory. Following an injury that had ruled him out of play for six months, Viviano was once again called up on 26 February 2012, ahead of Italy’s friendly against United States three days later. On 13 May 2012, he was included in Cesare Prandelli’s 32-man provisional squad for UEFA Euro 2012; however, he was later excluded from the final 23-man team on 28 May.