John Legend thinks his Twitter hacker is hilarious.

John Legend

John Legend

A number of messages were posted on the 38-year-old star's micro-blogging page, which took aim at US President Donald Trump and Hillary Clinton, but John saw the funny side of the now-deleted posts.

He took to Instagram to write: "My twitter has been hacked. Will handle asap. My hacker is vulgar but kinda hilarious (sic)."

When John regained control of his Twitter account, he wrote: "I'm back. My hacker was vulgar and kinda hilarious. I'll try to be funnier from now on so he won't feel the need to ghost write for me.

"I would never threaten violence to the President. No matter how much I wish he would go away.

"I wouldn't call him a Cheeto because I enjoy Cheetos.

"I did call him Liar-In-Chief. Then my hacker took over to do the Angrier John version of it all (sic)."

The hacker also changed John's bio to say "I have a small penis" but claimed John's was well endowed in a tweet, leaving the singer confused.

He quipped: "My hacker's assessment of my endowment was confusing. Big in the tweet about Hillary. Small in the bio. Make up your mind, hacker (sic)."

John's wife Chrissy Teigen also saw the funny side of the hack, sharing a direct message a friend had sent her about John's changed bio and writing: "Best DM of my life."