Tougher penalities are needed for social media users who name and vilify rape victims online, a House of Lords committee has heard.

Rape victims are being "deliberately named and abused" online because laws to protect their anonymity are too weak.

Tim Thompson, legal adviser to the Crown Prosecution Service, said changes to the law may be necessary to prevent the names of children involved in court proceedings and victims of sexual offences being revealed to the public.

"The issue is that the Children and Young Persons Act, which restricts reporting in relation to children involved in criminal proceedings, is breached by publication but that particular act has publication defined in a way that doesn't include deliberately putting things on social media," he said.

Currently, the Sexual Offences Amendment Act, which provides anonymity to complainants in sexual offences, applies to people who expose victims on social media but only carries a financial penalty.

"That's something some district judges have commented on when dealing with cases where individual victims of rape have been vilified in campaigns of people deliberately naming and abusing them," Thompson added.

He was backed up by Alison Saunders, the director of public prosecutions, who added that the current laws were good enough to prosecute those who make threats or harass others online, but there were problems with the naming of people given legal protection by the court.

"Where we do think the legislation needs to be looked at is around some of the reporting restrictions in relation to anonymity and breach of orders," Ms Saunders told the House of Lords Communications Committee, as reported by the BBC.

Also speaking to the committee, the chief constable of the Essex Police said new "preventative laws" were needed to stop online crime.

"There are too many victims out there whose lives have been devastated by online abuse," Stephen Kavanagh said.

"Of course legislation can be applied to many of the criminal behaviours on social media, but we believe it is time to consider whether enabling preventative and enforcement legislation will assist in keeping people more safe in the online environment."

In one widely-publicised case, nine people were fined £624 each in 2012 after they admitted to revealing the identity online of a woman raped by the footballer Ched Evans.

Her name was circulated on social media sites and she was subjected to abuse from some of the defendants, who called her a "money-grabbing slut" and a "poor little victim".

One tweet read: "She is to blame for her own downfall. Let's find her address."