Have you ever wondered who the writers behind some of your favorite songs are? It's not always the person who sings the song, and the actual writers can be a bit surprising. Many of the masterminds behind your favorite songs are actually other pop stars, and many of them were written before they were famous in their own right.

Related: Ariana Grande’s Best-Selling Songs Of All Time, Ranked

Bebe Rexha was a big songwriter for many artists before she hit it big as a singer herself. Alongside Sia and Jessie J., most of these stars had a career in writing before they became superstars themselves. These are ten singers who wrote songs for other stars before they were famous.

10 Bebe Rexha – "The Monster"

Before Bebe Rexha made it big in the music world singing her own songs, she was writing hit songs for other artists. One song that she's responsible for seems like it's a bit unlikely for Bebe, however, she wrote it when she was in a very dark place herself: "The Monster" by Eminem featuring Rihanna. Bebe had been going through some bad times — she had just been dropped from her record label and her own career was at a standstill; she wasn't the Bebe Rexha we know today. Putting her feelings into words, "The Monster" was born. Eminem wrote verses to go with her hook, and the song as we know it was created.

9 Ne-Yo – "Irreplaceable"

We all know that Beyoncé has quite a few iconic songs, but even the Queen B needs a little help when it comes to songwriting some of her best songs, one of them being her hit track "Irreplaceable." But what you might not realize is that there was another famous face that was behind the writing for this song. That famous face was none other than Ne-Yo. The singer was the hand behind the pen on a number of songs, Beyoncé's being one of his most famous.

8 Ed Sheeran – "Little Things"

Before Ed Sheeran was a household name himself, he was writing hit songs for many other people. Ed Sheeran was the mastermind behind One Direction's hit song "Little Things." The track features adorable lyrics that all 1D fans know and love. There's a lot of history behind the song, as Ed wrote the song when he was just 17 years old way before his was the big name that he is today. He found the song again a few years later, and decided that he wanted to send it to the One Direction boys, and it was an instant hit.

7 Julia Michaels – "Sorry"

Before Julia Michaels stepped out into the music scene as a solo artist, she was the person writing some of your favorite songs for other artists. One of Julia's most popular songs that she's ever written for another artist is "Sorry" by Justin Bieber.

Related: 10 Of Niall Horan’s Best Songs (According To YouTube Views)

Julia admittedly didn't think her song would get on Justin's album when she sent him her songs, but she was so excited when she found out it was chosen. The song is one of her most successful ones, as it spent 42 weeks on the Hot 100. Julia has also written for Fifth Harmony, Selena Gomez, and even Britney Spears.

6 Sia – "Diamonds"

It's been quite a long time since Rihanna has released any new music, but we can always look back and reminisce on some of her older hits. One of Rihanna's most popular songs is "Diamonds." The hit track was actually written by fellow famed singer, Sia. The song apparently came to Sia very quickly, and the track was written in a matter of minutes. When Rihanna heard Sia sing her demo version of the song, she immediately loved the way she sang it, and followed her exactly when Rihanna recorded her own version of the track.

5 Jessie J – "Party In The USA"

When Miley Cyrus was just starting off on her music career, she released her still ever so popular and catchy track, "Party In The USA." What many people might not realize about the song is it wasn't written by Miley at all. Instead, the writing credits go to none other than Jessie J. Back when she wrote the song for Miley, Jessie J still hadn't hit it big as a solo artist herself. The song was an instant hit and spent 28 weeks on the Hot 100, where it reached No. 2. The popularity of the song really helped Jessie J out financially, as the royalties helped pay her rent for a few years.

4 Charli XCX – "I Love It"

Charli XCX has become a famous singer and performer over the past couple of years. Before she really made it big in her own right, she was a songwriter for a number of hit songs that you might not know about. Charli might've been featured on the popular track "I Love It" by Icona Pop, however, she was the one who actually wrote it. She originally wrote the song for her own album, but decided that it would be a better fit for Icona Pop.

3 Kesha – "'Till The World Ends"

Over the years, Britney Spears has had so many hits that we can barely count them all. Of course, with all of those songs, she had to have help writing them. One of her hit singles, "Till The World Ends" was actually written by none other than Kesha.

Related: Best Of Hip-Hop: Essential Protest Songs From Eminem, Ice Cube, Kendrick Lamar And Others

When Kesha found out she'd be writing for Britney, she put herself in her shoes, and the track was born. Kesha was so happy with the song, and was incredibly proud of herself for writing it for Britney.

2 Katy Perry – "I Do Not Hook Up"

When Katy Perry was just getting started in the music industry as a performer, she wasn't as big of a name as she is today. As a result, besides making her own music and trying to get it known, she did a bit of writing that ended up going to other singers. Katy was a co-writer for the song "I Do Not Hook Up," that she was originally supposed to put on her own album. The song didn't make the cut, but American Idol winner Kelly Clarkson heard the song and loved it, deciding to snatch it up and put it on her own record.

1 Bruno Mars – "Nothin' On You"

We all know Bruno Mars to be the talented singer and performer he is today, as he has a list of his own hits that we can count on more than two hands. Before Bruno made it big with his own career, he spent a lot of time writing songs for other artists. One song that you might not realize Bruno was behind was "Nothin' On You" by B.o.B. The rapper should be thankful that Bruno wrote that song for him, as it is his only song to ever hit No. 1.

Next: The 10 Best Queen Songs You’ve Never Heard