There are standard operating instructions for the Internet and you’ve probably heard them before: don’t feed the trolls, stay away from certain social-networking sites and whatever you do, however much they call to you, never read the comments at the bottom of the page. Many of the most popular features and facets of the online world, the ones that allow for the kind of community and broad conversation and idea sharing that only the Internet can provide, also have a reputation as an open sewer of vitriol — of racist, sexist, xenophobic, homophobic, threatening and just plain offensive language and activity.

How did it get to be this way? Social psychologists have a few ideas about the factors that might contribute. One is the disinhibition effect. The Internet is a place where people can be anonymous, invisible and part of a very large crowd. With users separated by physical distances and free from authority, consequences or social cues, the norms encoded into most face-to-face interactions fall away.

Many who watched the early days of the Internet remember seeing how the culture emerged and norms solidified. There were the early Usenet flame wars: fierce and seemingly endless arguments about topics both important and banal. There were jokesters and pranksters who took pleasure in pushing people’s buttons and upsetting debates by voicing irrational, unpopular or downright nasty opinions. By the early 1990s, this activity had a name: ‘trolling’. The trolls were aided and abetted by a sort of bystander apathy. Many believed that someone else, surely, would speak up about what was going on — few did.

That silence effectively gave the small number of trolls the ability to set the cultural standards for all. You hear it all the time: they’re a part of the digital fabric. You can’t do anything about it. Just ignore it.

But online toxicity and cyberbullying have grown out of control in the ever-connected world of social media and gaming. And their rancid fruits have spilled beyond the confines of digital space: reputations have been ruined, privacy invaded and other real harms inflicted.

Online toxicity poses complex problems for companies whose networks host open forums and social interaction. Facebook and Twitter, for example, are private owners of what many deem to be public spaces, places where bullying and harassment can happen, but also where protest, civic action and calls for social justice take place. The question is open as to what extent these companies should be held accountable — whether they should protect targets of abuse, punish abusers and provide ways for society’s malcontents to assemble.

Online toxicity and cyberbullying have grown out of control.

Promisingly, many companies seem to have accepted that efforts to control behaviour, although difficult, are worth it. Research on those who inhabit these online spaces and how they interact can reveal ways to tackle the complexities, but much of this useful work goes on behind the scenes. One of the companies most public about its efforts is Riot Games of Los Angeles, California, the maker of the popular online game League of Legends. The company has tackled a formidable problem with toxicity by asking players to help set the game’s cultural norms. Its efforts are evidence-based and supported by classic psychological theory. And, as we explore in a News Feature, it is collaborating with academic scientists, who may be able to inject new ideas into its work.

For the company, its actions serve the bottom line. League of Legends has a problem with toxicity that drives some people away. But many observers think that the sense of responsibility that Riot projects is sincere.

The company is to be lauded for sharing what it has learnt and for collaborating openly and transparently. Games and social networks can provide a rich seam of behavioural data free from the artificiality of laboratory work, and the number of participants is incredible. There are certainly risks involved for the companies. Many users are unaware of the extent to which digital companies already manipulate and experiment with their individual experiences, as revealed in the backlash to a Facebook study (A. D. I. Kramer et al. Proc. Natl Acad. Sci. USA 111, 8788–8790; 2014). And, of course, experiments designed to get people to spend more money or more time on the Internet will probably never be palatable to every user. But if the citizens of the Internet are willing to participate in the right kinds of studies and experiments, it could lead to a friendlier, more-productive space.