Pressure was added on the Potters with them slipping into the bottom three for the first time this season due to midweek results.
Early play produced chances for both sides but the crowd had to wait until 34 minutes before a goal was produced.
A poorly cleared corner by Stoke fell to John Robinson 15 yards out who hit a well struck volley but the ball deflected just inside the six yard box allowing ex Stoke forward Peter Thorne to poke home.
An equaliser wasn't far off and four minutes later, a Gifton Noel-Williams cross from the left was pounced upon by John Eustace on the right of the box and his shot was squeezed between defenders and into Neil Alexander's bottom right corner.
The first-half drama didn't stop there and five minutes before half time, the Welsh side resumed the lead.
Robinson assisted again with a pin-point cross from the right finding goal scorer Thorne loosely marked in the middle of the area, allowing him to nod the ball past Ed de Goey and into his bottom left.
The Potters came out looking more positive after the break but that did nothing to stop Thorne grabbing his hat-trick.
A Gary Croft cross from the right missed the diving head of Robert Earnshaw but was neatly finished with the ball being put straight under Ed de Goey at the back post.
Sub Ade Akinbiyi smashed one home in the 74th minute but despite Stoke's best efforts, it was Cardiff who got all three points.