Nadal, the top seed, whipped Slovakian qualifier Karol Beck 6-1, 6-2 and Federer, the No. 2 seed, was a 6-3, 6-3 victor over Italy's Andreas Seppi.
Nadal will go against Frenchman Gael Monfils in the quarterfinals. Monfils moved ahead with a 7-5, 7-6 (7-4) over countryman Nicolas Devilder.
Federer will play the No. 8 seed, German Philipp Kohlschreiber, who beat Belgian Kristof Vliegen 6-4, 6-7, (4-7), 6-4, in the quarters.
Third-seeded Andy Murray of Britain also won, turning back German Philipp Petzschner 6-2, 6-4 and No. 4 Andy Roddick of the United States eliminated French wild card Arnaud Clement 6-3, 7-5.
Murray will play Ukrainian Sergiy Stakhovsky and Roddick meets Romanian Victor Hanescu in the quarters.
Stakhovsky ousted Austrian Alexander Peya 7-5, 6-3 and Hanescu moved on by defeating Russian Mikhail Youzhny 6-2, 6-4.
Workers accuse National Zoo of animal mismanagement
Video of Victoria’s Secret models trying to 'twerk' hits Instagram