They were joined in the last 32 by 2012 winner Andy Murray and reigning Wimbledon women's champion Petra Kvitova.
But former world number one Ana Ivanovic, the eighth seed, and 2011 champion Samantha Stosur were knocked out on a day when stiff winds brought new challenges at Flushing Meadows for players already tackling plus 30 degree heat (+90F).
World number one and top seed Djokovic breezed past France's Paul-Henri Mathieu 6-1, 6-3, 6-0, firing 13 aces and 33 winners as the 2011 champion comfortably remained on course for a fifth successive final appearance.
"I managed to play better in the important moments, play solid, use my serve efficiently with accuracy rather than speed."
Also Read
World number one Williams, chasing a third successive New York title, her sixth in total and an 18th major, sent 25 winners past Vania King and broke serve six times, wrapping up a 6-1, 6-0 victory on windswept Arthur Ashe Stadium in just 56 minutes.
"It's so hard to play in the wind but I am happy to get through a solid match with the conditions," said the top seed whose colorful leopard print dress was as striking as her tennis.
"It wasn't easy, but you have to be able to adjust. I had fun out here, I enjoy playing out on Arthur Ashe court."
Eighth-seeded Murray brushed aside 27-year-old German qualifier Matthias Bachinger, the world number 235, with a convincing 6-3, 6-3, 6-4 win.
Canadian fifth seed Milos Raonic made the third round with a 7-6 (7/4), 5-7, 6-4, 7-6 (7/3) win over German qualifier Peter Gojowczyk on the back of 26 aces and 64 winners.