New government proposals say victims have a right to know who is behind malicious messages without the need for costly legal battles.
The powers will be balanced by measures to prevent false claims in order to get material removed.
But privacy advocates are worried websites might end up divulging user details in a wider range of cases.
Last week, a British woman won a court order forcing Facebook to identify users who had harassed her.
Nicola Brookes had been falsely branded a paedophile and drug dealer by users - known as trolls - on Facebook.
Facebook, which did not contest the order, will now reveal the IP addresses of people who had abused her so she can prosecute them.
The new powers, to be added to the Defamation Bill, would make this process far less time-consuming and costly, the government said.
Complying with requests would afford the website greater protection from being sued in the event of a defamation claim.
The new rules would apply to all websites - regardless of where they are hosted - but the claimant would need to be able to show that the UK was the right place to bring the action.
End to 'scurrilous rumour'
Currently, in legal terms, every website "hit" - visit - on a defamatory article can be counted as a separate offence.
This means many websites remove articles as soon as a defamation claim is made - either rightly or wrongly.
"Website operators are in principle liable as publishers for everything that appears on their sites, even though the content is often determined by users," said Justice Secretary Ken Clarke.
"But most operators are not in a position to know whether the material posted is defamatory or not and very often - faced with a complaint - they will immediately remove material.
Nicola Brookes said the abuse started after she posted a message about an X Factor star
"Our proposed approach will mean that website operators have a defence against libel as long as they identify the authors of allegedly defamatory material when requested to do so by a complainant."
Mr Clarke said the measures would mean an end to "scurrilous rumour and allegation" being posted online without fear of adequate punishment.
"The government wants a libel regime for the internet that makes it possible for people to protect their reputations effectively but also ensures that information online can't be easily censored by casual threats of litigation against website operators.
"It will be very important to ensure that these measures do not inadvertently expose genuine whistleblowers, and we are committed to getting the detail right to minimise this risk."
But Privacy International, an organisation that campaigns at an international level on privacy issues, says that there is a concern that "gun-shy website operators will start automatically divulging user details the moment someone alleges defamation in order to shield themselves from libel actions".
"A great deal of the content posted by internet trolls is not actually defamatory, instead constituting harassment, invasion of privacy or simply unpleasant but lawfully-expressed opinion," said Emma Draper, head of communications at Privacy International.
"However, if the choice is between protecting users' anonymity and avoiding a potentially costly lawsuit, many small operators are not going to be overly concerned about whether or not a user has genuinely defamed the complainant."