The Swiss, a five-time champion in California, eased past Kyle Edmund 6-1 6-4 in just over an hour. Ranking number 4 in the world, Federer, who has yet to drop a set at the tournament, saved all seven break points that he faced and won 79% of first serve points.
Second seed Rafael Nadal also reached the last eight with a straightforward 6-3 6-4 victory over Filip Krajinovic.
The Spaniard will play Karen Khachanov next following the Russian’s 6-4 7-6 (7-1) win over John Isner.
Kyle Edmund, who won the Indian Wells second-tier Challenger event last week, struggled on serve in the opening set.
Edmund was broken in the first game of the match and quickly went a double break down, before getting on the board at 5-1.
Read Also: Roger Federer edges closer to 100th title
The second set was more competitive, with Kyle Edmund creating three break opportunities as Federer served for the match, but he was unable to take them.
Edmund will face world number 67 Hubert Hurkacz next after the Pole beat 24th seed Denis Shapovalov 7-6 (7-3) 2-6 6-3.
In the women’s draw, Canada’s Bianca Andreescu thrashed former world number one Garbine Muguruza 6-0 6-1 to reach the semi-finals.