It comes amid concern the practice is allowing people to abuse others online with little prospect of being identified and prosecuted.
Celebrities such as England footballer and poverty campaigner Marcus Rashford and former Little Mix singer Jesy Nelson were among those to have been abused repeatedly on social media in recent months.
And last week, Hannah Ingram-Moore, daughter of the late fundraiser Captain Sir Tom Moore, said the family sought to shield the centenarian from online abuse know as “trolling”.
The Duchess of Sussex previously described how in 2019 she was “the most trolled person in the entire world”.
Dame Vera said: “I think that getting rid of anonymity is fundamental to being able to enforce the law quite obviously.
“People sit at home with a funny name and say the most horrible thing, having quite a lot of pleasure because they can’t be found - that must be the point of it, mustn’t it, to do it without any comeback.
“It’s very unpleasant indeed and it’s imperative they be brought to justice.”
Dame Vera said there were parallels between perpetuating hateful abuse online and stalking somebody in their home.
She said people should not be prevented from using a pseudonym or humorous name, but said the user should have to provide identifying details when setting up an account which would mean they can be traced by the police should the need arise.
She said: “Of course you need to be able to identify people who behave like this and the Government really has to get engaged with the platforms and make sure they do make it possible to identify.”
Last week, Twitter said it would not end the practice of allowing people to post from anonymous accounts, despite a series of high-profile sports stars receiving a slew of racist abuse on social media in recent weeks.
Dame Vera was speaking following the completion of a report calling for a new law to transform victims’ rights and reposition victims as participants - rather than bystanders - in the justice system.