Daniel Radcliffe will appear in a public service announcement to condemn homophobia.

The Harry Potter star, 20, has volunteered to appear in the broadcast on behalf of the Trevor Project, a charity which supports LGBT people who are at risk of suicide.

Radcliffe told E! Online: “I grew up knowing a lot of gay men, and it was never something that I even thought twice about – that some men were gay and some weren’t. And then I went to school and (for) the first time, I came across homophobia. I had never encountered it before. It shocked me.

“I have always hated anybody who is not tolerant of gay men or lesbians or bisexuals. Now I am in the very fortunate position where I can actually help or do something about it.”

Last August, the star gave a “large” donation to the Trevor Project’s helpline. He has been the subject of gay rumours in the last few years but has shrugged them off.

He added: “I have described myself as being ‘gently eccentric’ and slightly different as a person just because I’ve had a very different set of influences growing up than anybody else in my peer group did.

“I’ve always felt very lucky to have the life that I’ve had. I never had to cope with anything serious about my religion or sexual orientation or anything like that. I think it’s important for somebody from a big, commercial movie series like Harry Potter, and particularly because I am not gay or bisexual or transgendered.

“The fact that I am straight makes not a difference, but it shows that straight people are incredibly interested and care a lot about this as well.”

The Trevor Project was founded in 1998 by three filmmakers whose film, ‘Trevor,’ a comedy/drama about a gay teenager who attempts suicide, received an Oscar in 2004.

It works to prevent crises and suicides among LGBTQ (lesbian, gay, bisexual, trans and questioning) youth through school workshops, educational materials, online resources and advocacy, along with the Trevor helpline.

Radcliffe’s ad will air this spring.