Nadal beat Ivan Dodig 6-4, 6-3, 6-3, affirming his favoritism to win this tournament. The second-seeded Spaniard has lost just 21 games across three matches and has faced only five break points, saving each one of them.
Federer then emerged on Arthur Ashe Stadium and notched an even more imperious victory, dominating Frenchman Adrian Mannarino in a 6-3, 6-0, 6-2 victory that came in just 81 minutes.
The five games conceded brought Federer's tournament tally to 21 - the same as Nadal - and the Swiss has spent only 4-1/2 hours on court, making a mockery of fears that his career was on the wane after an early exit at Wimbledon and patchy form since.
"There's always a lot of pressure coming out here on this court to perform, because you never know if you're going to play well," said Federer, who compiled a 34-8 edge in winners, "but tonight was one of those nights."
The 38th-ranked Dodig beat Nadal at the hard-court tournament in Montreal two years ago. But Nadal is looking like the king of hard courts these days, with an 18-match winning streak on the surface.
"I am winning because I am playing well from the baseline and I am making the right decisions in the right moments," Nadal said.
Before they can play each other in the quarterfinals - in what would be their first ever match at a US Open - Nadal and Federer must negotiate tricky fourth-round matches.
Federer will face Spanish veteran Tommy Robredo, who ended the run of 179th-ranked qualifier Daniel Evans of Britain 7-6 (6), 6-1, 4-6, 7-5, while Nadal will take on German Phillip Kohlschreiber, who eliminated big-serving American John Isner.
"I don't look ahead," Federer said when asked about the looming Nadal clash, "even though I understand the urge of the press to try to go there already. I have gone through that my entire career, people talking about our matches even before the tournament started.
"We're used to it. We know how to handle it. Clearly I think we both hope it's going to happen this time, for the first time in New York."
Fourth-seeded David Ferrer needed nearly three hours to down 172nd-ranked qualifier Mikhail Kukushkin 6-4, 6-3, 4-6, 6-4. His next opponent is No. 18-seeded Janko Tipsarevic, who also took four sets to knock off 20-year-old American Jack Sock 3-6, 7-6 (1), 6-1, 6-2.
Eighth-seeded Richard Gasquet and No. 10 Milos Raonic set up another fourth-round matchup with victories.
The losses by Isner and Sock meant wild card Tim Smyczek was the only American man left in the singles draw.
Unless Smyczek manages to beat Marcel Granollers on Sunday, there will be no Americans in the men's singles round-of-16; the first time that has ever happened in the US Open, dating back to 1881.
In the women's draw, second-seeded Victoria Azarenka took 2 hours, 40 minutes to close out Alize Cornet 6-7 (2), 6-3, 6-2.
Serving on game point at 5-3 in the second, Azarenka pumped her fist and started walking off the court after the 26th-seeded Cornet hit a backhand into the net. The chair umpire had to get her attention to inform her that the line judge had called Azarenka's previous shot out - replays showed it landed inside the baseline. The umpire overruled the call, but they still had to replay the point.
"Are you freaking kidding me?" Azarenka howled to the chair ump. "What the hell are you doing?"
After the match, she put it this way: "That was the most ridiculous thing there is."
On her second try at set point, Azarenka hit a forehand wide to send the game to deuce. But she won the next two points to clinch the set, after all.
Then she dominated the third to advance to face 13th-seeded Ana Ivanovic, who beat young American Christina McHale 4-6, 7-5, 6-4 victory in 2 hours, 26 minutes. McHale served for the match at 5-4 in the second set and had two break points at 5-5.
While McHale lost, another young American Alison Riske pulled off an impressive scalp by cruising past former Wimbledon champion Petra Kvitova 6-3, 6-0. The Czech had been in bed with a fever the day before.
"My body wouldn't let me fight," Kvitova said.
Simona Halep, seeded 21st, crushed No. 14 Maria Kirilenko 6-1, 6-0, setting up a clash with Flavia Pennetta, who beat 27th-seeded Svetlana Kuznetsova 7-5, 6-1.
No. 10 Roberta Vinci will face unseeded Camila Giorgi in an all-Italian match. The 136th-ranked Giorgi defeated 2009 US Open runner-up Caroline Wozniacki, who was seeded sixth, 4-6, 6-4, 6-3.