The world number one will face America’s John Isner or Australian John Millman in the last eight.
Croatia’s Karlovic, 36, set a new all-time record for aces, but lost to Pablo Cuevas in the last 16.
'Don't look at him' - Wilander advises how to counter Kyrgios 'chaos'
  • Career ace records began to be kept in 1991. They include aces served in main draw ATP World Tour and Grand Slam matches, and the Olympics from 2008 on. Totals do not include aces served in the Davis Cup. Goran Ivanisevic turned pro in 1988, three years before ace records were kept - via ATP website.
The Uruguay completed a 7-6 (7-5) 7-6 (9-7) over the Croatian, who hit 26 aces in defeat.
With 10,247 aces in his career, Karlovic overtakes the previous record held by his compatriot Goran Ivanisevic on 10,237.

Novak Djokovic reached the China Open last four.

Image credit: Reuters

"It's a great feeling," said Karlovic.
"For the past year I knew it was possible and I was hoping that it would be this year. It's great that it happened here.
"I'm not done yet. There are many years in front of me and hopefully that number will go up and up."
Third seed Rafael Nadal booked his place in the last eight on Wednesday. He will meet Jack Sock on Friday.
STORY: Nadal pushed by Pospisil before reaching China Open quarters, but Berdych out
Results from the China Open Men's Singles Round Two matches on Thursday
6-John Isner (U.S.) beat John Millman (Australia) 4-6 7-6(5) 6-4
1-Novak Djokovic (Serbia) beat Zhang Ze (China) 6-2 6-1
Fabio Fognini (Italy) beat 7-David Goffin (Belgium) 6-2 2-6 6-2
Pablo Cuevas (Uruguay) beat Ivo Karlovic (Croatia) 7-6(5) 7-6(7)
'I'm going to take it to him' - Tearful Norrie ready for shock Djokovic semi-final
Wimbledon order of play, day 10 – When are Nadal, Halep and Kyrgios playing?