Nadal routed German qualifier Denis Gremelmayr 6-2, 6-2 and will face Mikhail Youzhny of Russia while Federer overwhelmed Slovenia qualifier Grega Zemlja 6-2, 6-3 to set up a meeting with Andreas Seppi of Italy.
Nadal and Federer kept up their impressive records against lower-ranked opponents: the second-ranked Nadal extended his streak of beating players outside the top 100 to 45, while third-ranked Federer made it 64 wins against players ranked outside the top 20.
Federer also won his 19th match in a row dating to his US Open semifinal loss to No 1-ranked Novak Djokovic.
Federer and Nadal were joined by the sixth-ranked Jo-Wilfried Tsonga, who saved two set points in the first set before beating Flavio Cipolla of Italy 7-6 (8), 6-3. Tsonga will face Albert Ramos of Spain.
Also, sixth-seeded Alex Bogomolov Jr. of Russia withdrew from the tournament with a right ankle injury, becoming the first seeded player not to advance.
Nadal, who last month complained he had too little time to prepare for the season, has come out strong in Doha. He broke the 189th-ranked Gremelmayr in the first game of both sets and never was seriously threatened. The match could have even been more one-sided but Nadal managed to convert only four of 15 break points.
Nadal said he was starting to get a feel for his heavier racket. He said the variety of shots he unleashed was important if he was to play better in the big matches, especially against Djokovic, whom he lost to in six finals last year including at the US Open and Wimbledon.
"I'm trying to play aggressive, I'm trying to return a little bit better, because for me the worst thing I did for most of last year was the return, especially the second half of the year," Nadal said. "(I'm) so happy with my returns here and happy how a few things have worked well with the new weight of the racket. I'm starting to have good feelings, so that's really important."
Federer, in contrast, talked with confidence of a game firmly under control. For a second day in a row, he's yet to drop a set and was happy to get through his match quickly.
"It can be tricky when you enter sort of the first tournament of the season and right away you play an incredibly tough three-setter, let's say," Federer said. "The body feels that, and that's why I'm happy to be through into the quarterfinals without too much trouble."
Tsonga, the third seed, struggled early on against the 75th-ranked Cipolla, who seemed to catch him off guard with his slice. Tsonga was broken to go down 4-3 and found himself down 5-4 with Cipolla serving for the set. But he broke Cipolla and went up 6-5 before the Italian forced a tiebreaker which Tsonga won.
Tsonga, though, picked up his game in the second set. Effectively deploying an array of drop shots and volleys, Tsonga broke twice for 4-1 and a third time to win the match with an emphatic overhead smash.
Tsonga said his net game was something he hopes to improve more often this season against the top five players.
"They all have something different," he said. "I mean, Rafa is running a lot, plays with a lot of spin. Roger takes the ball very early, and Novak, too. Andy Murray, he's an incredible defender, and his passing shots are just amazing.
''So, I try to follow my way, and I think my way is to be really offensive and play with my serve, my forehand, and of course my volley, too. So I just try to improve my volley."