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: Chicago Bears sign Ha Ha Clinton-Dix: Grade, reaction and more
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: Aurora Cannabis appoints U.S. billionaire Nelson Peltz as strategic adviser
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: Bryce Harper hit by pitch in foot, leaves game
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.
- Raiders release Nelson after 1 season
- New Zealand shooter used 5 guns in mosque massacre
- Nancy Pelosi Boots Mike Pence From His House Office
- Four New 'Sniper Elite' Projects Announced, Including 'Sniper Elite 5'
- European Union extends sanctions on Russian individuals, blacklisting another eight officials
- Liberals must let Wilson-Raybould come back to committee, opposition says
- Malaysia: Won't Drop Case Against Vietnamese in Kim Murder
- Spotify Files EU Antitrust over Fee in the Apple App Store
- Alia Bhatt makes an exciting announcement on her birthday
- Tyreek Hill, Chiefs wide receiver, under investigation for incident involving son