The Swiss lived dangerously in a tight first set before winning 7-6 (8/6) 7-5 6-3.
It was a match dominated by big serving with break-point chances few and far between but Federer’s greater class off the floor proved decisive as he claimed the opportunities which came his way.
The paucity of rallies meant the 16-times grand slam winner failed to get a true assessment of the state of his game but his ability to perform when it counts remains intact. He said: “I think it was important to face the pressure of facing a guy like Ivo who can serve his way out of trouble and keeps you on your heels the whole time.
“You’re not quite sure what’s going to happen. If you miss one or two minutes of the game, the next thing you know, you’re stuck in a fifth set with more pressure.
“So I think that was a good thing.”
Rafael Nadal had preceded Federer on Rod Laver Arena and delivered the “complete match” in beating Lukas Lacko.
World No 2 Nadal was pushed early on by the Slovakian qualifier but once he upped his level, Lacko was powerless to stave off a 6-2 6-4 6-2 defeat in just under two hours.
There will be no American in the last 16 in Melbourne for the first time in the open era following John Isner’s defeat to Feliciano Lopez. The Spaniard edged out the big-serving 16th seed 6-3 6-7 (3/7) 6-4 6-7 (0/7) 6-1 in almost three and a half hours.
Seventh seed Tomas Berdych beat South African Kevin Anderson 7-6 (7/5) 7-6 (7/1) 6-1 while 10th seed Nicolas Almagro overcame a strangely out-of-sorts Stanislas Wawrinka 7-6 (7/2) 6-2 6-4.
Home favourite Bernard Tomic battled through to a meeting with Federer after outlasting Alexandr Dolgopolov 4-6 7-6 (7/0) 7-6 (8/6) 2-6 6-3.
British No 1 Andy Murray was due to play world No 46 Michael Llodra in the third round in the early hours of this morning.
Caroline Wozniacki produced a routine win over Monica Niculescu in the women’s singles.
The Dane triumphed 6-2 6-2 against 31st seed Niculescu after which she again attempted to play down the significance of her No 1 ranking.
The Dane, who is still seeking her first grand slam crown, has to reach at least the quarter-finals in Melbourne to stand any chance of staying ahead of the chasing pack.
“To be honest I just play,” said Wozniacki. “I want to try to do my best here and whatever happens, happens.
“I have proven myself for the last two years. I have finished No 1 twice in a row.”
Victoria Azarenka secured a 6-2 6-4 victory over Mona Barthel and next up is Czech Iveta Benesova, who thrashed Russian qualifier Nina Bratchikova 6-1 6-3.
Wozniacki will meet Jelena Jankovic, a 6-2 6-0 victor over American Christine McHale.
Eighth seed Agnieszka Radwanska progressed with a 6-2 6-2 win against Galina Voskoboeva, as did 22nd seed Julia Goerges who beat Romina Oprandi 3-6 6-3 6-1.
Chinese star Li Na, the first Asian to win a grand slam title when she claimed the French Open in 2011, set up a repeat of last year’s final in Melbourne against Kim Clijsters when her third-round opponent Anabel Medina Garrigues had to retire with an ankle injury.
Clijsters beat Daniela Hantuchova 6-3 6-2.