Ed Sheeran
Ed Sheeran wrote Love Yourself and Cold Water but gave both songs to Justin Bieber Theo Wargo/Getty Images

When Ed Sheeran is not topping the charts with his own music, the Thinking Out Loud singer is creating hits for other artists. In a new interview, the British crooner reveals that although he wrote chart-topping ballad Love Yourself for Justin Bieber, he would never have featured the track on his own album.

Although narrowly missing out on nabbing the Christmas number one, Love Yourself has become one of Bieber's most successful singles in the UK after spending six consecutive weeks at number one. Sheeran, 25, reveals that he had initially written the track for his upcoming third album ÷ (Divide) but changed his mind.

Explaining how Love Yourself fell into Bieber's hands, Sheeran told Carson Daly on 97.1 AMP Radio: "That was a song I had written for ÷. It just wouldn't have made it. And then Justin took it and did his thing on it, and released it as a single and made it what it is."

He added: "So going from a song that would have never been released to [being] the biggest song of last year – it just became Billboard's number one of 2016 of the whole year, and [was] nominated for song of the year at the Grammys – it just shows you that you shouldn't always write stuff off. [Justin] did have input on it, I wouldn't say it was just all me."

Sheeran clearly does not stop putting pen to paper – so much so that he even forgets songs he has written. Bieber enjoyed even more chart success with Cold Water, a collaboration with Major Lazer, which was also penned by Sheeran.

However, the Castle On The Hill singer only realised Bieber had recorded the song after hearing it once it was released. Sheeran explained: "Cold Water was a weird one because I didn't even know that song existed. It was a song I must've half-written somewhere at a time where I was writing a lot of songs...

Justin Bieber tour
Justin Bieber spent six consecutive weeks at number one with Love Yourself Kevin Winter/Getty Images

He continued: "And then the song came out and it was number one and I was like 'Oh, that song!' I remember doing it, but it was really, really slow. I remember hearing it and being like 'That kind of sounds like me. Oh wait, it was me'."

Sheeran is just as busy behind the scenes as he is in front of the microphone so here are some songs by some pretty famous artists he has written for.

Songs you didn't know Ed Sheeran wrote

Justin Bieber – Love Yourself (2016)

One Direction – Little Things (2013)

Jessie Ware – Say You Love Me (2014)

The Weeknd – Dark Times (2015)

Rudimental – Lay It All On Me (2015)

Matt Terry – When Christmas Comes Around (2016)

Lupe Fiasco – Old School Love (2013)

Tori Kelly – I Was Made For Loving You (2015)

Hilary Duff – Tattoo (2015)