Lee Tomlin scored the game’s only goal in the 73rd minute as Town were left to rue missed chances after falling to a second successive defeat.
Graeme Jones made two changes to the starting line-up following last weekend’s 2-0 loss to West Bromwich Albion, with Izzy Brown back in the 11 for the first time since defeat to Brentford in November.
Cameron Carter-Vickers was making his first start for the Hatters following his January loan move to the club from Tottenham Hotspur, with Kazenga LuaLua and Donervon Daniels beginning on the bench.
The opening exchanges were lively and full of opportunities, which mainly went the Hatters’ way.
Brown was at the forefront of Town’s attacks – winning two free-kicks for himself – but he failed to beat the wall on either occasion.
Ryan Tunnicliffe broke forward into the box minutes later but his attempted pull back to Harry Cornick in the middle was just behind him and Cardiff managed to clear.
Cornick had another chance in the 19th minute when Brown’s interception fell to him 25 yards from goal. He drove forward at pace and fired across goal, but his effort went wide of the post.
Just before half-time from a Cardiff corner, Town cleared and broke forward at speed with Brown. The midfielder progressed forward and fired goalwards, but Marlon Pack produced a vital headed clearance away.
Just before the hour mark, Simon Sluga was alert to save Joe Bennett’s effort directly from a corner which swung in from the right-hand-side.
The Croatia international was called into action again when Matty Pearson misjudged his header and allowed Paterson through on goal, but Sluga stood tall to block his chipped effort.
His efforts however, weren’t enough to keep out Tomlin, who scored the winner with 17 minutes to play with a curling effort from the edge of the box.
Straight from the restart, Dan Potts produced a fantastic ball into the box but Collins couldn't direct his diving header on target.
Substitute George Moncur had a drive from outside of the box in added time which Smithies knocked into the path of Collins, but the striker couldn’t make contact with the ball and Cardiff managed to clear.
The Hatters are now nine points from safety and are back in action at Kenilworth Road on Wednesday night when they welcome Sheffield Wednesday.
TOWN: Sluga, Bree, Carter-Vickers, Pearson, Potts, Tunnicliffe (LuaLua 78), Mpanzu, Rea (Moncur 78), Cornick, Brown (Berry 63), Collins (C) Subs not used: Shea, McManaman, Shinnie, Daniels.
CARDIFF: Smithies, Richards, Morrison (C), Nelson, Bennett, Pack, Vaulks, Paterson, Adomah (Whyte 90), Murphy (Hoilett 74), Tomlin (Bacuna 80) Subs not used: Etheridge, Flint, Glatzel, Ward.
Goals: Tomlin (73)
Yellows: Morrison
Referee: James Linington
Attendance: 10,049 (1,000 away)