We’ve come up with the menacing term “troll” for someone who spreads hate and does other horrible things anonymously on the Internet. Internet trolls are unsettling not just because of the things they say but for the mystery they represent: what kind of person could be so vile? One afternoon this fall, the Swedish journalist Robert Aschberg sat on a patio outside a drab apartment building in a suburb of Stockholm, face to face with an Internet troll, trying to answer this question.

The troll turned out to be a quiet, skinny man in his 30s, wearing a hoodie and a dirty baseball cap—a sorry foil to Aschberg’s smart suit jacket, gleaming bald head, and TV-trained baritone. Aschberg’s research team had linked the man to a months-long campaign of harassment against a teenage girl born with a shrunken hand. After meeting her online, the troll tormented her obsessively, leaving insulting comments about her hand on her Instagram page, barraging her with Facebook messages, even sending her taunts through the mail.

Aschberg had come to the man’s home with a television crew to confront him, but now he denied everything. “Have you regretted what you’ve done?” Aschberg asked, handing the man a page of Facebook messages the victim had received from an account linked to him. The man shook his head. “I haven’t written anything,” he said. “I didn’t have a profile then. It was hacked.”

This was the first time Aschberg had encountered an outright denial since he had started exposing Internet trolls on his television show Trolljägarna (Troll Hunter). Usually he just shoots them his signature glare—honed over decades as a muckraking TV journalist and famous for its ability to bore right through sex creeps, stalkers, and corrupt politicians—and they spill their guts. But the glare had met its match. After 10 minutes of fruitless back and forth on the patio, Aschberg ended the interview. “Some advice from someone who’s been around for a while,” he said wearily. “Lay low on the Internet with this sort of stuff.” The man still shook his head: “But I haven’t done any of that.”

With evidence in hand, Aschberg confronts a troll on his show.

“He’s a pathological liar,” Aschberg grumbled in the car afterward. But he wasn’t particularly concerned. The goal of Troll Hunter is not to rid the Internet of every troll. “The agenda is to raise hell about all the hate on the Net,” he says. “To start a discussion.” Back at the Troll Hunter office, a whiteboard organized Aschberg’s agenda. Dossiers on other trolls were tacked up in two rows: a pair of teens who anonymously slander their high school classmates on Instagram, a politician who runs a racist website, a male law student who stole the identity of a young woman to entice another man into an online relationship. In a sign of the issue’s resonance in Sweden, a pithy neologism has been coined to encompass all these forms of online nastiness: näthat (“Net hate”). Troll Hunter, which has become a minor hit for its brash tackling of näthat, is currently filming its second season.

Hate is having a sort of renaissance online, even in the countries thought to be beyond it.

It is generally no longer acceptable in public life to hurl slurs at women or minorities, to rally around the idea that some humans are inherently worth less than others, or to terrorize vulnerable people. But old-school hate is having a sort of renaissance online, and in the countries thought to be furthest beyond it. The anonymity provided by the Internet fosters communities where people can feed on each other’s hate without consequence. They can easily form into mobs and terrify victims. Individual trolls can hide behind dozens of screen names to multiply their effect. And attempts to curb online hate must always contend with the long-standing ideals that imagine the Internet’s main purpose as offering unfettered space for free speech and marginalized ideas. The struggle against hate online is so urgent and difficult that the law professor Danielle Citron, in her new book Hate Crimes in Cyberspace, calls the Internet “the next battleground for civil rights.”

A publicity shot for Troll Hunter.

That Sweden has so much hate to combat is surprising. It’s developed a reputation not only as a bastion of liberalism and feminism but as a sort of digital utopia, where Nordic geeks while away long winter nights sharing movies and music over impossibly fast broadband connections. Sweden boasts a 95 percent Internet penetration rate, the fourth-highest in the world, according to the International Telecommunication Union. Its thriving tech industry has produced iconic brands like Spotify and Minecraft. A political movement born in Sweden, the Pirate Party, is based on the idea that the Internet is a force for peace and prosperity. But Sweden’s Internet also has a disturbing underbelly. It burst into view with the so-called “Instagram riot” of 2012, when hundreds of angry teenagers descended on a Gothenburg high school, calling for the head of a girl who spread sexual slander about fellow students on Instagram. The more banal everyday harassment faced by women on the Internet was documented in a much-discussed 2013 TV special called Men Who Net Hate Women, a play on the Swedish title of the first book of Stieg Larsson’s blockbuster Millennium trilogy.

Internet hatred is a problem anywhere a significant part of life is lived online. But the problem is sharpened by Sweden’s cultural and legal commitment to free expression, according to Mårten Schultz, a law professor at Stockholm University and a regular guest on Troll Hunter, where he discusses the legal issues surrounding each case. Swedes tend to approach näthat as the unpleasant but unavoidable side effect of having the liberty to say what you wish. Proposed legislation to combat online harassment is met with strong resistance from free speech and Internet rights activists.

What’s more, Sweden’s liberal freedom-of-information laws offer easy access to personal information about nearly anyone, including people’s personal identity numbers, their addresses, even their taxable income. That can make online harassment uniquely invasive. “The government publicly disseminates a lot of information you wouldn’t be able to get outside of Scandinavia,” Schultz says. “We have quite weak protection of privacy in Sweden.”

The same information ecosystem that aids trolls also makes it easier to expose them.

Yet the rich information ecosystem that empowers Internet trolls also makes Sweden a perfect stalking ground for those who want to expose them. In addition to Aschberg, a group of volunteer researchers called Researchgruppen, or Research Group, has pioneered a form of activist journalism based on following the crumbs of data anonymous Internet trolls leave behind and unmasking them. In its largest troll hunt, Research Group scraped the comments section of the right-wing online publication Avpixlat and obtained a huge database of its comments and user information. Starting with this data, members meticulously identified many of Avpixlat’s most prolific commenters and then turned the names over to Expressen, one of Sweden’s two major tabloids. In December 2013, Expressen revealed in a series of front-page stories that dozens of prominent Swedes had posted racist, sexist, and otherwise hateful comments under pseudonyms on Avpixlat, including a number of politicians and officials from the ascendant far-right Sweden Democrats. It was one of the biggest scoops of the year. The Sweden Democrats, which have their roots in Sweden’s neo-Nazi movement, have long attempted to distance themselves from their racist past, adopting a more respectable rhetoric of protecting “Swedish culture.” But here were their members and supporters casting doubt on the Holocaust and calling Muslim immigrants “locusts.” A number of politicians and officials were forced to resign. Expressen released a short documentary of its reporters acting as troll hunters, knocking on doors and confronting Avpixlat commenters with their own words.

Make the Unknown Known

Martin Fredriksson is a cofounder of Research Group and its de facto leader. He is a lanky 34-year-old with close-cropped hair and a quietly intense demeanor, though he is prone to outbursts on Twitter that hint at his past as a militant anti-racism activist. I met Fredriksson at the tiny one-room office of Piscatus, the public records service for journalists that he oversees as his day job. Robert Aschberg, the chair of Piscatus’s board, has known Fredriksson for years and jokes that he is a brilliant researcher and an excellent journalist, but “you can’t have him in furnished rooms.” The extreme sparseness of the office bore him out. One of the only decorations was a Spice Girls poster.

Fredriksson hunched over his computer’s dual screens and logged in to the intranet he had created to coördinate Research Group’s unmasking of Avpixlat users. Research Group typically works in a decentralized manner, with members pursuing their own projects and collaborating with others when needed. The group currently has 10 members, all volunteers, including a psychology graduate student, a couple of journalism students, a grade school librarian, a writer for an online IT trade publication, and a porter in a hospital. The little organizing that occurs typically happens in Internet relay chat rooms and on a wiki. But analyzing the Avpixlat database, which contained three million comments and over 55,000 accounts, required a centralized, systematized process. An image on the main page of the intranet pokes fun at the immensity of the task. Two horses have their heads stuck in a haystack. “Find anything?” asks one. “Nope,” says the other.

The Expressen home page when the paper published the Avpixlat scoop, unmasking prominent Swedes.

Research Group was founded during the exhaustive process of unmasking a particularly frightening Internet troll. That episode began in 2005, when Fredriksson and his close friend Mathias Wåg learned that an anonymous person was requesting public information about Wåg from the government. As a return address, the requester used a post office box in Stockholm. That kept Fredriksson and Wåg in the dark at first. But the next year, they obtained a copy of a prison magazine in which a notorious neo-Nazi named Hampus Hellekant, who was in prison for murdering a union organizer, had listed the same post office box. In 2007, after Hellekant was released, pseudonymous posts began to appear on Swedish neo-Nazi forums and websites, soliciting information about Wåg and other leftist activists.

For three years, Fredriksson and some like-minded investigators tracked Hellekant’s every move, online and off. “He was functioning more or less as the intelligence service for the Nazi movement,” Fredriksson says. Their counterintelligence operation involved a mix of traditional journalistic techniques and innovative data analysis. One unlikely breakthrough came courtesy of Hellekant’s habit of illegally parking his car all over Stockholm. Fredriksson’s team requested parking ticket records from the city. They were able to match the car’s location on certain days with time and GPS metadata on image files Hellekant posted under a pseudonym. In 2009 they sold the story of Hellekant’s post-prison activities to a leftist newspaper, and Research Group was born.

Since then, its members have investigated the men’s rights movement, Swedish police tactics, and various right-wing groups. Until the Avpixlat story they had mostly published their findings quietly on their website or partnered with small left-wing news organizations. “The official story is that we pick subjects about democracy and equality,” says Fredriksson. “But the real reason is that we just have special interests—we just try to focus on stuff that interests us as people.”

By the time Research Group came together, Fredriksson’s interest in Nazi hunting and talent for investigative reporting had landed him a job with Aschberg. Fredriksson had scraped data from a mobile payment platform with woefully inadequate security in order to investigate the donors to a neo-Nazi website. He also happened to get the records of scores of users who had made payments to Internet porn sites. Aschberg used the data on his show Insider, Sweden’s answer to NBC’s Dateline, where he exposed government officials who had bought Internet porn on their official cell phones. Then he hired Fredriksson as a researcher on Insider: he functioned as the technical brains behind many of Aschberg’s confrontations. Today Fredriksson does not work for Troll Hunter, and the show has no formal connection to Research Group. But Fredriksson’s legacy is clear in the technical detective work that the show often uses to expose its targets.

Fredriksson might accurately be called a “data journalist,” as his specialty is teasing stories from huge spools of information. But the bland term doesn’t do justice to his guerrilla methods, which can make the pursuit of information as thrilling as the hunt for a serial killer in a crime novel. When Fredriksson gets interested in a project, he seizes it obsessively. Aschberg speaks of him in awe, as a potent but alien force. “He’s very special,” he says. “He’s one of those guys who can sit for 24 hours and drink sodas and just work.”

Members of Research Group.

Fredriksson is a member of a generation of Swedes known as “Generation 64,” who grew up tinkering with Commodore 64s in the 1980s and went on to revolutionize Sweden’s IT industry. His upbringing also coincided with the rise of a neo-Nazi movement in the 1990s, when he was a teenage punk rocker. He and his friends constantly clashed with a gang of skinheads in his small hometown in southern Sweden. “I was very interested in politics. I came to the conclusion that if I wanted to do politics I’d have to deal with the Nazi threat in some way,” he says. He joined the controversial leftist group Antifascistisk Aktion (AFA), which openly endorses the use of violence against neo-Nazis. In 2006 he was sentenced to community service for beating a man during a fight between a group of neo-Nazis and antiracists. “He said it was me. It actually wasn’t, but it just as well could have been,” Fredriksson says. He says he eventually came to believe that violence is wrong, and today his weapon of choice is information, not his fists. He is more interested in understanding hate than destroying it, although he wouldn’t mind if one led to the other. Research Group challenges the traditional divide between activism and journalism: it is guided by the values of its members, many of whom come from leftist circles. In the early 2000s, Fredriksson was heavily involved in Sweden’s free culture movement, which abhorred copyright laws, embraced piracy, and coded the first version of the legendary Pirate Bay’s BitTorrent tracker. Whenever Research Group is in the news, critics seize on its members’ leftist ties to discredit them as agenda-driven propagandists. But their methods are meticulous, and their facts are undeniable. “Our history will always be there,” says Fredriksson. “People will always say, ‘Oh, 10 years ago you did that.’ Whereas I live in the now. The only way for me to build credibility is to just publish valid stuff again and again, and hope I’m not wrong.”

However, his idiosyncratic background sometimes leads him from the path of traditional journalistic inquiry into murky ethical territory. “I like to pick up stones and see what’s under them,” he says. “I like to go wherever I want to go and just look at stuff.”

The mass unmasking of Avpixlat commenters in 2013 was an accidental consequence of this curiosity. Avpixlat is an influential voice in Sweden’s growing right-wing populist movement, which is driven by a xenophobic panic that Muslim immigrants and Roma are destroying the country. The site fixates on spreading stories of rapes and murders committed by immigrants, which it contends are being covered up by the liberal establishment. (“Avpixlat” means “de-pixelate,” as in un-censoring an image that’s been digitally obscured.) Initially, Fredriksson wanted to study how it functioned as a source of näthat. Avpixlat, and especially its unruly comments section, has become notorious as a launching pad for rampaging online mobs. “They provoke, they incite people to harass politicians and journalists,” says Annika Hamrud, a journalist who has written extensively about the Swedish right wing. When the site picked up the story of how a shop owner in a small town put up a sign welcoming Syrian refugees to Sweden, she explains, he was bombarded with online abuse. Wåg, Fredriksson’s friend and colleague, calls Avpixlat “the finger that points the mob where to go.” Fredriksson’s idea was to create a database of Avpixlat comments in order to investigate how its cybermobs mobilized. Avpixlat uses the popular commenting platform Disqus, which is also used by mainstream publications in Sweden and around the world. Fredriksson planned to scrape Disqus comments from Avpixlat and as many other Swedish websites as possible. He would then compare the handles of commenters on mainstream websites with those on Avpixlat. The extent of the overlap would suggest how dominant Avpixlat users were throughout the Web, and how responsible they were for the general proliferation of näthat.

A neo-Nazi rally in Linköping, Sweden, in 2005.

Fredriksson hacked together a simple script and began to scrape Avpixlat’s comments using Disqus’s public API (the application programming interface, which lets online services share data). As he built his database, he noticed something odd. Along with each username and its associated comments, he was capturing a string of encrypted data. He recognized the string as the result of a cryptographic function known as an MD5 hash, which had been applied to every e-mail address that commenters used to register their accounts. (The e-mail addresses were included to support a third-party service called Gravatar.) Fredriksson realized he could figure out Avpixlat commenters’ e-mail addresses, even though they were encrypted, by applying the MD5 hash function to a list of known addresses and cross-referencing the results with the hashes in the Avpixlat database. He tested this theory on a comment he’d made on Avpixlat with his own Disqus account. He encrypted his e-mail address and searched the Avpixlat database for the resulting hash. He found his comment. “By that time I knew I had stumbled on something which the newspapers would be very interested in,” he says. He kept his scrapers running on Avpixlat and other websites that used Disqus, including American sites like CNN, eventually assembling a database of 30 million comments. But the goal was no longer a general survey of näthat. He wanted to answer an even more fundamental question: who are the real people behind Avpixlat’s hateful comments? “It had been like this great unknown for many years,” Fredriksson says. “It was this huge blank spot on the map that we could just fill out. Make the unknown known.”

In order to begin the process of unmasking Avpixlat’s users, Research Group needed a huge list of e-mail addresses to check against the Avpixlat commenter database, especially those of people whose participation in a racist right-wing website would be newsworthy. Sweden’s liberal public-records laws proved invaluable again. Research Group filed public information requests and collected thousands of e-mail addresses of parliament members, judges, and other government officials. For good measure, Fredriksson threw in a list of a few million e-mail addresses he’d found floating around on the Web. All told, Research Group assembled a list of more than 200 million addresses—more than 20 times the population of Sweden—to check against the database of 55,000 Avpixlat accounts.

Fredriksson gives lectures about online research, and he has found it’s easier to unmask people than many believe. “Anonymity online is possible, but it’s frail,” he says. He clicked on one Avpixlat user who had used his account to complain a lot about Muslims. He entered the user’s e-mail address into Google and found that the man had listed the address and his full name on the roster of his local boating club: “There he is.” If users’ e-mail addresses didn’t suffice, a researcher would begin wading through their comments, which sometimes numbered in the thousands, to glean clues to their identity.

Research Group toiled away for 10 months on the Avpixlat data, eventually identifying around 6,000 commenters, of whom only a handful were ever publicly named. A few months into the research, Fredriksson approached Expressen, whose investigative reporting on the Swedish far right he admired. The newspaper bought the story.

Fredriksson says people who spread hatred don’t deserve anonymity.

Payback

Research Group was so focused on analyzing the database that it did not seriously consider what the public fallout from the revelations might be. When the story came out, it sparked a firestorm. Angry Internet users, who saw the exposé as an assault on freedom of speech, began to distribute addresses of Research Group members as payback, a favored tactic of online intimidation known as “doxxing.” A Research Group member named My Vingren moved from her apartment after strange men visited one night. The address of Fredriksson’s parents was circulated. Debate about the ethics of the story raged, and even political opponents of the Sweden Democrats voiced reservations. Particularly egregious to some critics was that while many of Expressen’s targets were politicians, some were private citizens, including businesspeople and a professor. “I was this close to having a stress reaction,” Fredriksson says.

“I like to pick up stones and see what’s under them,” Fredriksson says.

Fredriksson stands by Research Group’s work on the database. He does not believe anonymity should be protected if it’s used to spread hate. “I think there are legitimate causes for anonymity,” he says. “But I think the Internet is a wonderful thing—I’ve been part of spreading culture among the masses—and personally, I get pissed off when the Internet is abused by some people.” Still, he’s ambivalent about Expressen’s exposure of private citizens. Research Group left it up to Expressen to choose what to report. If it had been his choice, he says, he would only have exposed politicians. “It could have been a much stronger story if they had stuck to public figures,” he says.

Research Group emerged from the furor slightly shell-shocked but proud, with a newfound reputation as a reputable journalistic force. A few months later, the Swedish Association of Investigative Journalists gave the group and Expressen an award for the scoop. This past September, Expressen published a new series based on the data, exposing more Sweden Democrats. One had called a black man a chimpanzee, while another had suggested that Muslims were genetically predisposed to violence. For these stories, Research Group was nominated for the Stora Journalistpriset, Sweden’s most prestigious journalism prize.

The stories came out a week before Sweden’s general election and had, by all appearances, no effect on the outcome. In fact, the Sweden Democrats won 13 percent of the vote, doubling their previous result to become the third-largest party in Sweden. Some even suggested that Expressen had helped the Sweden Democrats by making them seem like victims. Fredriksson says he’s simply happy to have helped push their public persona a little closer to what he believes they stand for in their heart of hearts: the ugly id that’s visible in Avpixlat’s comments sections every day. “I say, well, we just showed that they are racist, and people are apparently liking that,” he says. “So, good for them.”

Research Group is currently deep into researching its next project, which is based on a huge database belonging to Flashback, Sweden’s largest general-interest forum. At a recent gathering, Research Group members spent six hours working through a list that Fredriksson provided of 100 e-mail addresses belonging to high-ranking military members, to see whether they had posted anything interesting on the site. They found only one—a man who had apparently confessed to hiring prostitutes, although this was unlikely to rise to the level of newsworthiness their publishing partner was looking for.

Exposing Flashback users could prove to be even more explosive than outing Avpixlat commenters. Flashback users do not talk mainly about their hatred of immigrants (though some do) but about their love lives, video games, cooking, politics, drug habits—the whole spectrum of human interest. Last summer, Fredriksson sparked an online outcry when someone asked on Twitter if Research Group had the database and he replied in the affirmative. When asked why, he brusquely responded, “Because we can.”

The tweet was controversial even within Research Group, and Fredriksson later tried to clarify that the team would be mining the database for näthat. But many Flashback users probably weren’t mollified. Research Group had “bragged about having stuff that would jeopardize vulnerable people’s secrets,” says Jack Werner, a journalist who covers online culture for the Swedish daily Metro and is a longtime Flashback user. “It was not very ethical but rather quite blunt and childish.” Anna Troberg, the leader of Sweden’s Pirate Party, denounced Research Group as “glorified vigilantes.”

Fredriksson wouldn’t tell me much about the project, except that it would be similar to the Avpixlat story in focusing mainly on official misdeeds. He says Flashback users can rest assured that Research Group is not interested in exposing anyone’s medical issues. “If they posted in the sex or drugs or health sections, then it’s just not interesting to us,” he says. “If they post in other parts of Flashback, where they put up slander about other people? It’s interesting to look at that.”

Adrian Chen is a freelance writer whose work has appeared in New York, Wired, and the New York Times.