Seventeen-time Grand Slam champion Federer, playing away from the main Rod Laver Arena court for the first time in ten years, was in exquisite form romping through the opening two sets in 54 minutes.
The Basel native blazed away for 52 winners, six service breaks and 11 aces to control his match with the 99th-ranked Slovenian.
Kavcic could only shake his head and marvel at the brilliance of the four-time Australian Open champion, although he came more into the match in the final set when he forced a tiebreaker.
But Federer played the pressure points the better to finish well on top in front of an adoring Australian crowd.
"it was a good first two sets," he said.
"I played really aggressive and it worked out," Federer said.
"The third set he was more consistent — he served better.
"In the process, it got closer. I'm happy I got it done in three."
World number one Nadal, chasing his second Australian crown, overcame rising Australian teenager Thanasi Kokkinakis 6-2, 6-4, 6-2 under the closed roof on Rod Laver Arena.
Nadal won match point not long after his great Grand Slam rival Federer wrapped up a 6-2, 6-1, 7-6 (7/4) win over Slovenia's Blaz Kavcic on Hisense Arena.
The Spanish top seed needed one hour and 53 minutes before extinguishing the 570th-ranked Australian in their first-ever meeting.
Nadal broke the youngster's serve five times and saved the three break points against him, but Kokkinakis acquitted himself well in the daunting challenge of playing the world number one before a full house.
It was just the workout Nadal needed after playing just one set in his opening round when Australian Bernard Tomic retired injured.
Former finalist Jo-Wilfried Tsonga profited from the heat-prompted switch to indoor conditions to breeze past Brazilian Thomaz Bellucci 7-6 (8/6), 6-4, 6-4 and into the last 32.
Tsonga said he was fortunate to have the benefit of playing under a closed roof, favouring his big serve, for the last two sets of the match.
Japan's Kei Nishikori mastered Dusan Lajovic to advance to the third round in straight sets.
The Japanese 16th seed kept the match to just one hour 49 minutes before prevailing 6-1, 6-1, 7-6 (7/3) over the Serb.
Nishikori, now coached by former French Open champion Michael Chang, reached the third round for the fourth consecutive year.