Women’s defending champion Caroline Wozniacki also progressed to set up a mouth-watering clash next with in-form former world number one Maria Sharapova.
But it was curtains for South African Kevin Anderson, who slumped out to young American Frances Tiafoe and became the highest seed, at five, to be sent packing so far.
On an overcast day at Melbourne Park, second seed Angelique Kerber, the 2016 winner, and former US Open champion Sloane Stephens joined the big guns in round three, but the women’s side also saw a top 10 player crash.
Ninth seed Kiki Bertens, who raced through the rankings last year after winning three titles, was whipped in three sets by Russia’s Anastasia Pavlyuchenkova.
Federer might be 37 but he’s not showing his age, with British qualifier Dan Evans the latest to fall under his spell as he works towards a third successive Australian crown and 21st major victory.
He defeated Evans at Wimbledon last year with the loss of just eight games, but it was a much harder assignment this time, winning 7-6 (7-5), 7-6 (7-3), 6-3 on Rod Laver Arena.
“I think if I could have pulled away earlier in the match it might have been easier,” said the third seed. “I think he played very well, it was hard to pull away to his credit.”
The Swiss star’s Australian achievements so far put him on a par with other six-time winners Novak Djokovic and Roy Emerson — although the Australian great’s victories all came before the Open era.
Federer next plays American Taylor Fritz.
If he goes on to win the tournament, he will become the first man ever to claim seven or more titles at two Grand Slams, having already won eight Wimbledon crowns.
Nadal had an easier route to round three, outclassing local hope Matthew Ebden 6-3, 6-2, 6-2.
The Spaniard is bidding for his own slice of history by becoming the first man in the Open era, and only the third in history along with Emerson and Rod Laver, to win each Grand Slam on two or more occasions.
“I played a solid match, I was happy with the way I served. I did a few things very well,” said Nadal, who next plays Australian Alex de Minaur. “It is an honour to play here. Was a great atmosphere.”
Anderson, beaten by Novak Djokovic in the Wimbledon final last year, was sent home by Tiafoe 4-6, 6-4, 6-4, 7-5.
The fifth seed struggled with an elbow injury early in the clash and couldn’t cope with the 20-year-old’s power and finesse.
Sixth seed Marin Cilic, who lost in the final to Federer last year, had no such dramas, grinding past American Mackenzie McDonald in four sets and next plays Spanish 26th seed Fernando Verdasco.
Dane Wozniacki, who is battling rheumatoid arthritis, steamrolled Sweden’s Johanna Larsson 6-1, 6-3 as she bids to become the first woman to defend the title since Victoria Azarenka in 2013.
It set up a tough clash with five-time Grand Slam champion Sharapova, who blitzed past Sweden’s Rebecca Peterson 6-2, 6-1.The Russian is in scintillating form and has dropped just three games in her opening two matches.
“I’m really happy with the way I performed,” said Sharapova, adding that she was looking forward to the Wozniacki showdown. “It’s a tough third round but I have set up the challenge and I’m ready to go out there and take it.”
Meanwhile, three-time Grand Slam champion Kerber dominated Brazilian qualifier Beatriz Haddad Maia 6-2, 6-3 to stay on a collision course with Stephens in the quarter-finals.
Stephens, who endured a horror run at Melbourne Park since reaching the semi-final in 2013, exiting in the first round in 2015, 2016 and 2018, swatted aside former doubles partner Timea Babos 6-3, 6-1.