Katy Perry spills her darkest secrets in her songs.

The American singer, 28, is famous for her bubble-gum pop music.

But Katy has now revealed that her tunes actually contain cryptic truths about her life and relationships.

"They all stem from the truth inside me," she told the UK edition of OK! magazine. "Maybe I'm not so specific with names, but that's my lockbox, where all my secrets go."

The singer has had a string of hit songs since rising to fame following the 2008 release of her second studio album, One of the Boys. Katy wishes she could share the feeling of writing a hit song with all of her fans.

"It's a special feeling you get like finding the person you love," she said. "If I could bottle that feeling and give everyone a whiff, I would!"

Citing her conservative Pentecostal upbringing, Katy confessed she initially struggled with song writing. It wasn't until she met her mentor, producer Glen Ballard, that she finally opened up.

"I was at that point in life where I was scared to write about certain subjects because I was still virginal," she said. "I remember I wrote a song called Nothing Like the First Time and I was really scared to present it because it had some risqué lyrics. He was like, 'You can write about anything, anything you feel, just write them.' I was so free by him allowing me to do that."

Katy was too scared to tell her parents she had written her first single. In the end, she made her older sister Angela spill the beans.

"She told them and of course they were upset," Katy said. "I'm the black sheep in the family and I wear that proudly."