<P> `` If I Were a Boy '' is a song performed by American singer and songwriter Beyoncé from her third studio album I Am ... Sasha Fierce ( 2008 ) . It was written by BC Jean and Toby Gad , who also handled its production alongside Beyoncé . Inspired by the difficult break - up of a romantic relationship , the song was initially recorded by Jean , whose record company rejected it . Beyoncé then recorded her own version . Jean was upset when she learned that Beyoncé was releasing it as a single , but eventually , they reached an agreement . Columbia Records released `` If I Were a Boy '' to US radio on October 8 , 2008 , as a double A-side single album 's alongside `` Single Ladies ( Put a Ring on It ) '' as the lead singles . The two songs showcased the contrast between Beyoncé 's personality and her aggressive onstage persona , Sasha Fierce . A Spanish version of the song , titled `` Si Yo Fuera un Chico '' , was digitally released in Mexico and Spain . </P>
who wrote the song if i were a boy
BC Jean Toby Gad