Third seed Djokovic ended the surprise run of Peruvian outsider Juan Pablo Varillas, winning 6-3, 6-2, 6-2, and has yet to drop a set through four matches.
The Serb, chasing a third Roland Garros crown, is into a record 17th French Open quarter-final after making the last eight at a major for the 55th time. "I'm proud of it, but my attention is already in the next match," said Djokovic, who faces Russian 11th seed Karen Khachanov for a place in the semi-finals, where Alcaraz could await. "I know what my goal is here.
I'm trying to stay mentally the course and of course not look too far. "Obviously the performance of today gives me a great deal of confidence about how I felt, about how I played." Varillas, 27, was the first player from Peru to reach the second week of a Grand Slam since Jaime Yzaga made the US Open quarter-finals 29 years ago.
Djokovic raced 4-0 ahead in the opening set only for Varillas to break in the next game and then have a chance to get back on serve in the seventh game.