The four-time Grand Slam champion was made to work harder than the scoreline suggests but was still relatively untroubled as she matched her best run at the championships.
She will face Swiss 14th seed Belinda Bencic next.
Service breaks were traded early in the first set before Swiatek reeled off four games in a row.
The 30th seed Martic kept in touch with Swiatek early in the second set but again the world number one managed to find some extra gears to move towards victory.
Martic had managed to win just seven games in two previous meetings with Swiatek but doubled that total after she saved a match point at 3-5 before breaking the Swiatek serve to love.
The momentum was shifting as Martic then went 40-0 ahead on serve for the chance of a 6-5 lead but in the blink of an eye Swiatek hit back to break and wrapped up victory in the next game as Martic bungled a dropshot into the net.
“I’m happy I could close it out at the end of the second set,” the 22-year-old Swiatek, who has been world number one for 67 successive weeks, said on court.
“Belinda is playing a great game and it’s never going to be easy in the fourth round of a slam.”