Edmund, who won the Indian Wells second-tier Challenger event last week, struggled on serve in the opening set.
Both the Spaniard and Federer have looked in supreme form since the start of the tournament, with both players yet to drop a set.
"That's something really special and (I'm) just happy to be part of it".
Federer needed just over an hour to dispatch Briton Kyle Edmund 6-1 6-4 in their first career meeting and reach the quarter-finals on a sunny and breezy day in Indian Wells.
They have not met since Shanghai in 2017, the same year that Federer beat Nadal 6-2 6-3 in the fourth round on his way to his fifth title at Indian Wells.More news: New Zealand gun laws to change: Ardern
Standing in the way to her first Indian Wells final is Ukraine's sixth seed Elina Svitolina, who managed a comeback victory 4-6, 6-4, 6-4 over Czech Marketa Vondrousova later on Wednesday. He never really got going.
"I think that's also one of the reasons I'm still in the game Hopefully when I play the top guys I am ready for it".
Three-time champion Nadal crushed Filip Krajinovic of Serbia 6-3, 6-4, while five-time champion Federer defeated Kyle Edmund of the United Kingdom 6-1, 6-4.
Nadal commented "I probably played a little bit worse today than yesterday", adding "but in general terms [it's] been a positive victory again".More news: Apple Fires Back at Spotify in Escalating App Store Feud
Kecmanovic became the first lucky loser to reach the last eight at Indian Wells since the ATP's Masters 1000 series launched in 1990. "It's small gaps", Nadal said about the upsets. Maybe because of the conditions, [it was] windier out there today.
"It will be amusing that somebody other than Novak is still in", he said of his famous countryman.
He will next take on 13th-ranked Russian Karen Khachanov, who beat world No. 9 John Isner 6-4, 7-6 (7/1).
Nishioka retired after losing the first set 6-4, having first sought treatment on court.
Dominic Thiem defeated Ivo Karlovic 6-4, 6-3 and will play the victor of the late fourth-round match between Philipp Kohlschreiber or Gael Monfils.More news: Malaysia: Won't Drop Case Against Vietnamese in Kim Murder
2016 finalist Milos Raonic kept his hopes of returning to a fourth Indian Wells semifinal by upending Jan-Lennard Struff 6-4, 6-3. Naomi Osaka, the world's top-ranked woman, also lost in straight sets a day earlier.
- Aurora Cannabis appoints U.S. billionaire Nelson Peltz as strategic adviser
- News FIA F1 Race Director Charlie Whiting passes away
- European Union extends sanctions on Russian individuals, blacklisting another eight officials
- Bryce Harper hit by pitch in foot, leaves game
- Spotify Files EU Antitrust over Fee in the Apple App Store
- Four New 'Sniper Elite' Projects Announced, Including 'Sniper Elite 5'
- Where to find Pi Day deals around San Diego
- Tyreek Hill, Chiefs wide receiver, under investigation for incident involving son
- Last remaining U.S. diplomats leave Venezuela
- New Zealand shooting: Brenton Tarrant called for attack on 'invader' Sadiq Khan