Denmark's Wozniacki was made to work hard for her win in California
Caroline Wozniacki was pushed to three sets by Russian 16th seed Nadia Petrova before booking her spot in the quarter-finals of the BNP Paribas Open.
The second seed was rarely at her best in a 6-3 3-6 6-0 win in Indian Wells, but will now play China's Zheng Jie.
"I didn't feel the ball. I'm just happy that I fought through," she said.
There were comfortable straight-sets victories for the fourth and fifth seeds Elena Dementieva and Agnieszka Radwanska, as well as Jelena Jankovic.
Dementieva and Radwanska will face each other in the last eight in California after relatively easy work-outs in their fourth-round ties.
Russia's Dementieva overcame 19th seed Aravane Rezai 6-3 6-3, while Poland's Radwanska beat Frenchwoman Marion Bartoli 6-3 6-2.
Serbian sixth seed Jankovic showed few signs of tiredness following a third-round match against Sara Errani that lasted almost three hours as she demolished the 17th-seeded Shahar Peer 6-2 6-2.
Eighth seed Samantha Stosur from Australia beat Russian Vera Zvonareva 6-2 7-5, while Spaniard Maria Jose Martinez Sanchez, 28th seed, eased past 13th-seeded Belgian Yanina Wickmayer 6-4 6-4.
The 19-year-old Wozniacki had the toughest match of the round having to overcome a wobble in the second set.
The Dane eventually turned on the power in the decider with Petrova winning just two points on her second serve.
"It was a match where it just went up and down quite a bit, and you didn't really know what to expect," Wozniacki said.
"It was not really a great rhythm there. I just think that I will be more ready for the next match."
Wozniacki's next opponent, Zheng, also had to come through a nervy three sets in a 6-3 4-6 7-6 (7-1) win over Australian Alicia Molik.
On facing the Chinese 18th seed, who needed two hours and 25 minutes to see off her unseeded opponent, Wozniacki said: "The last time I played against Zheng I lost.
"It was a tough match. She's a great player. She had a good start of the year, playing aggressively, taking the balls early. I need to be ready and focused."