The Serb, who is yet to lose a match in 2013, secured a 6-0 5-7 6-2 win over his Italian opponent to set up a third-round clash with No31 seed Grigor Dimitrov in California.
“Mentally I was there,” said world No1 Djokovic. “Confidence level is high obviously because of the run I had this year. Game wise, everything works.
“I had a very bad game at 4-2, couple of unforced errors, got him back in the match. Next thing you know, we’re one set all and a couple of tight games.
“But I’m not concerned. I know I have been in this situation before where I had minor setbacks in a match, especially in the opening matches where I’m trying to get used to the court, the conditions, and so forth. In the end, I have done what I needed to do. So I feel good about myself.”
Elsewhere, eighth seed Jo-Wilfried Tsonga secured his third-round spot with a 7-6 (6) 6-4 victory over American wild card James Blake. The Frenchman will face Mardy Fish for a place in the next round.
MORE: The latest football news
MORE: The latest tennis news