"If I Were a Boy" is a song recorded by American singer Beyoncé for her third studio album, I Am... Sasha Fierce (2008). It was written by BC Jean and Toby Gad and Deejaycyfer, who also handled its production alongside Knowles. Inspired by the difficult break-up of a romantic relationship, the song was initially recorded by Jean, whose record company rejected it. Knowles then recorded her own version.