Actor Zach Braff has issued a public apology to Pharrell Williams after jokingly comparing the Grammy Award-winning hitmaker to a monkey on Twitter.

The former Scrubs star was sharing his thoughts online during the prizegiving's telecast on Sunday (08Feb15), when he fired off a comment about Williams' bellhop outfit for his performance of Happy.

Many fans compared the buttoned jacket and shorts look, complete with a round hat, to the Lobby Boy costume in the Oscar-nominated movie The Grand Budapest Hotel, but Braff went one step further and posted a side-by-side snap of the superproducer next to a screenshot of his Oz the Great and Powerful character, a cartoon monkey named Finley.

He captioned the picture, "someone just sent me this: #IWoreItBetter (sic)".

The post sparked a backlash from followers, who blasted Braff as a racist, and the furore subsequently prompted the star to delete the controversial tweet.

He then apologised for his actions, insisting he meant no offence.

Taking to Twitter on Monday (09Feb15), Braff wrote, "I love Pharrell. I thought the outfit he wore was similar to that of my bell hop outfit in Oz. I apologize."