An accused carjacker has been arrested in Sydney's CBD after getting stuck in traffic.

The 19-year-old attempted to steal a Jeep Patriot from a 34-year-old man on Eddy Avenue just before midday on Saturday, allegedly assaulting the motorist and driving off.

But officers then noticed the Jeep driving along Pitt Street shortly after and were able to arrest the man "due to traffic congestion", police said.

He was charged with robbery, unlicensed and dangerous driving and assault and will appear in Sydney's Central Local Court on Sunday.