The 16-time major champion, who completed a career Grand Slam at Roland Garros in 2009, improved on the mark he shared with Jimmy Connors.
The last time Federer failed to reach the quarterfinals at a major was at the 2004 French Open, when he was the top-seeded player but lost to Gustavo Kuerten in the third round.
"Twenty-eight quarterfinals in a row, that's great," Federer said. "But that's another opportunity for me to go one step further."