Federer, a seven-time champion at the All England Club, has not dropped a set in the tournament through four matches after beating unseeded American Steve Johnson 6-2, 6-3, 7-5 at Centre Court on Monday.
"I would have never thought that I was going to win the first four matches in straight sets, so I'm extremely pleased," Federer said. "The matches might be tough, but then the rest in between [is] great."
The victory gave Federer his 306th match win in a Grand Slam and put him into his 48th quarterfinal at a major, three wins away from becoming the first man to win eight Wimbledon titles. He is tied with Pete Sampras and William Renshaw with seven.
"You can always, always lose the tournament in the first week, but never win it," Federer said. "So I did a lot of things right the first week and from now, you really want to -- or you have to -- start playing your best tennis."
Looking fresh and sharp after two days off, Federer broke Johnson five times and was in control throughout a match that lasted just over 90 minutes -- one of 16 men's and women's fourth-round matches on the schedule.
"I didn't think it was as easy as it maybe looked," the third-seeded Federer said.
Federer hadn't played since Friday, when he was the only man to finish a third-round match, and he was able to rest over the weekend while the tournament cleared up a backlog of matches caused by a rainy first week.
He next faces No. 9 Marin Cilic, the 2014 US Open champion, who advanced when Kei Nishikori retired from their fourth-round match.
The fifth-seeded Japanese player was trailing 6-1, 5-1 when he decided to stop the match, giving Cilic a spot in the Wimbledon quarterfinals.
Nishikori warmed up for Wimbledon by playing on grass in Halle, Germany, but he pulled out before his second match because of a rib injury.
Sam Querrey suffered no hangover from his win over No. 1 seed Novak Djokovic as he beat Nicolas Mahut of France 6-4, 7-6 (5), 6-4 on Court 18.
Querrey is the first American man to reach the Wimbledon quarterfinals since Mardy Fish in 2011 and the first to make it that far at any Grand Slam sinceJohn Isner and Andy Roddickat the 2011 US Open. The No. 28 seed will next face either sixth-seededMilos Raonic or 11th-seeded David Goffin.
Federer reaches Wimbledon quarterfinal
Roger Federer beats Steve Johnson in straight sets to advance to the quarterfinals at Wimbledon.
Federer: Johnson is much more confident
Roger Federer talks about his fourth-round win over Steve Johnson at Wimbledon.