Jamie Richards, 18, was worried about having a negative reaction, but 20 people queued for a trim.
Passers-by also donated Â£30 - which he handed back to his "customers".
Mr Richards, from Aberdare, is now planning to collect money at the salon where he is training and give out clothes and food on his next visit.
"I just thought it was something nice to do. I had a day off work, my girlfriend was in work, so I just thought I'd travel down," he said.
"I always see them [homeless people] around and feel bad as I want to give them money but am not the richest and can't afford it."
His selfless act mirrors that of a London barber, who did the same thing in his home city earlier this year.
The former Ysgol Gyfun Rhydywaun pupil began cutting somebody's hair on Queen Street and soon there was a queue.
"It went a bit bonkers. A lot of people wanted older styles, like Peter Andre curtains," he said.
"There was also a guy who shaved his head but loved having a beard and didn't know what to do with it.
I gave it a scissor cut and he teared up, running around saying how good he looked."
Over the course of the day, Mr Richards gave cuts to about 20 people, with Â£30 in coins also left by passers-by who mistakenly thought he was collecting money.
Mr Richards added: "As I was leaving, someone came charging after me, insisting I have it.
"I had left it there for the homeless. That was the bit that really pulled at my heart strings."
Mr Richards, who has been training to be a barber for eight months, now aims to raise money in his Aberdare salon and return to Cardiff's streets on a regular basis to cut hair.
A trainee barber who felt bad about having no money to give to homeless people has been using his skills to give free haircuts in Cardiff.