In the 36th career meeting between the two superstars, Federer needed just 68 minutes to advance to a meeting with Australian Nick Kyrgios, who toppled five-time Indian Wells champion Novak Djokovic 6-4, 7-6 (7/3).
“For me, it was all about coming out and trying to play the way I did in Australia,” said Federer, who beat Nadal in a five-set thriller to lift the Australian Open title in January.
“I didn't think it was going to be that possible, to be quite honest, because the court is more jumpy here or more rough, let's say, so it's hard to put the ball away.”
Although he captured his 18th Grand Slam title in Melbourne, 35-year-old Federer said he still considers himself on the comeback trail after knee surgery sidelined him for much of 2016.
His Australian Open triumph was followed by a shock loss to world number 116 Evgeny Donskoy in Dubai, where Federer says he was still feeling an Australian Open hangover.
Upon arrival at Indian Wells, where he has lifted the trophy four times, Federer said he had regained his energy and was ready to play the attacking style the venue requires.
“It's hard to dig your way out of defence, because the ball doesn't skid on you as an attacker, and I think I did well again today,” he said.
Playing a best-of-three set match against Nadal, “getting in the lead was crucial, and then staying on the offence and pressing was the goal for me.
“I was able to hold my serve, and he couldn't find a way how to get into my service games more frequently. Next thing you know, it's all over. It was a really good performance by me, I thought.”
The victory marked the first time in a rivalry stretching back to 2004 that Federer has strung together three straight wins over Nadal. He beat the Spaniard in the final at Basel in 2015 and in Melbourne in their two most recent previous contests.
But Federer wasn't taking long to reflect on that achievement, with giant-killer Kyrgios coming up.
“Obviously can't celebrate too long this time around,” he said of his latest win over Nadal. “I have to get back to work in a couple of days.
Meanwhile world number three Stan Wawrinka rallied for 3-6, 6-3, 7-6 (7/4) victory over Japanese lucky loser Yoshihito Nishioka Wednesday to reach the quarterfinals.
Switzerland's Wawrinka, a three-time Grand Slam champion, labored for two hours and 13 minutes to get past the 70th-ranked Nishioka, who twice served for the match in the third set before succumbing in the tiebreaker.
Wawrinka next faces either eighth-seeded Austrian Dominic Thiem or 10th seeded Gael Monfils of France.