Town’s eight match unbeaten run came to an end despite Luke Chambers giving Blues the lead.
The skipper got on the end of Tom Lawrence’s free-kick to head Town in front midway through the first-half but Cardiff were level by the break through Kenneth Zohore’s volley.
Zohore put the Bluebirds ahead early in the second-half and the points never really looked in doubt once Joe Bennett had added to the home advantage just past the hour.
Town made two changes to the side that drew at Barnsley last week, with Tommy Smith and Grant Ward coming back in. Loanee Emyr Huws was unavailable to feature against his parent club.
Peter Whittingham went close with a free-kick from the edge of the box in the game’s first opening, Zohore then firing over as the Bluebirds started brightly.
Whittingham sent another free-kick into the box but David McGoldrick led a quick counter and Tom Lawrence then set up Ward who looked certain to score but Allan McGregor produced a terrific save.
Lawrence was crowded out as he tried to weave his way to goal, the ball falling to Chambers whose cross was arrowed in at Jonas Knudsen but Jazz Richards cleared the danger as Town got a foothold in the game.
McGoldrick sent a 25 yarder just over before Town got the breakthrough on 23 minutes, Lawrence sent a free-kick over and Chambers got on the end of it at the back post to head past McGregor.
Bart Bialkowski pushed Joe Bennett’s free-kick over the bar, Sol Bamba heading over from the corner as the home side looked for an immediate response.
Bialkowski denied Zohore after Craig Noone had burst forward, Toumani Diagouraga then heading over at the other end from Lawrence’s excellent free-kick.
Town were conceding too many free-kicks in and around the box and inevitably the equaliser came from a set-piece on 35 minutes, Zohore volleying in after Sean Morrison had headed back across goal.
Zohore fired wide after Noone’s cross had not been cleared, then Cole Skuse showed great awareness to cancel out the threat after Aron Gunnarsson had got around the back.
Cardiff were inches away from taking the lead before the break when Junior Hoilett spun inside the Town box and rattled the post with a left foot strike, Whittingham sending yet another free-kick over the bar, then Gunnarsson blasted wide right on the half-time whistle.
Brett Pitman replaced Smith at the break, Morrison heading over from a corner as the second-half got underway.
McGoldrick couldn’t convert at the far post after Christophe Berra had headed on from Lawrence’s free-kick before Town went behind on 49 minutes, a superb backheel from Hoilett released Zohore and he made no mistake from 15 yards.
McGoldrick showed a touch of class to trick his way into the Cardiff box before testing McGregor with a chip, then Hoilett was equally adept at finding space for himself in the other box before sending a curler just past the far post.
Cardiff extended their lead on 63 minutes. Kadeem Harris was allowed to work his way into the danger area and Bennett smashed the ball into the far corner.
Bamba put Ward’s cross behind as McGoldrick threatened at the near post, Noone well over with a 25 yarder at the other end.
Pitman couldn’t force McGoldrick’s cross in as Town looked for a way back into the game, Blues then making a double change 12 minutes from time with Freddie Sears on for McGoldrick and Danny Rowe coming on for his debut, Diagouraga making way.
Rowe was welcomed to the Championship with a thumping challenge from Bamba, Zohore looking for his hat-trick with a 30 yarder straight at Bialkowski.
Town’s ‘keeper saved from Hoilett when it should have been four to Neil Warnock’s side, Pitman then going close for Blues but Morrison blocked his goalbound effort from close range as Town’s run of six draws came to an end.
Cardiff: McGregor, Bennett, Morrison, Richards, Whittingham, Noone (Halford 78), Bamba, Gunnarsson, Harris (John 90), Zohore (Pilkington 83), Hoilett. Subs not used: Murphy, Manga, Lambert, Meite.
Town: Bialkowski, Spence, Chambers, Berra, Smith (Pitman 46), Knudsen, Skuse, Ward, Diagouraga (Rowe 78), Lawrence, McGoldrick (Sears 78). Subs not used: Gerken, Digby, Bru, Kenlock. Booked: Berra, Pitman.