Katy Perry posted on Instagram Thursday a preview of herself singing "Waving Through a Window" from hit Broadway play "Dear Evan Hansen."

Perry said she was asked to record a cover of the song by "Dear Evan Hansen" creators Benj Pasek and Justin Paul to help promote the musical's national tour.

"On the outside, always looking in/ Will I ever be more than I've always been?/ 'Cause I'm tap, tap, tapping on the glass/ I'm waving through a window," the pop star sings in the snippet, which was released alongside photos of Perry with cast members of the play.

"On April 29, 2017, I went and saw 'Dear Evan Hansen' on Broadway, and was emotionally transformed forever. In my own life, I've struggled with depression, and like so many, always feeling alone in the battle of wanting to belong," Perry wrote.

"That night, I was particularly struck by the song 'Waving Through A Window.' It embodied the mental isolation I sometimes fought," she continued.

"I hope this song helps you know that you are not alone, and that I'm waving back at you."

Perry's cover will be released in full during a listening party that is set to take place at 9 p.m. PDT on the official YouTube page for "Dear Evan Hansen."