In 2009, an American civil rights lawyer created a mashup mapping a neighbourhood called Coal Run, Ohio. It showed which houses were connected to the town's water supply and which houses were occupied by black or white families. A mashup uses data from more than one source, usually publicly available information, and almost always presents it on a map. The results were extraordinary: the map showed that almost all the white households in Coal Run had water piped to their homes, while all but a few black households did not. Those without piped water had to carry water home from the water plant by whatever transport they could muster, pump it from wells contaminated with sulphur and oil from old mining operations or, in extremis, collect rainwater.

For more than 50 years, Coal Run's African American residents had called on local authorities to remedy this inequity. Nothing happened except that, during that time, public waterlines spread around Coal Run to new businesses and homes – overwhelmingly to white people's homes. The mashup helped them get what they wanted when it was used as part of a discrimination complaint to the Ohio civil rights commission. But what had changed? Surely the disgraceful facts were already at the complainants' disposal? The answer was that the data could be assembled differently online.

"We could articulate the case in words," said civil rights lawyer Reed Colfax who represented the residents. "But when you'd put up the maps, they'd stop listening to you and look at them [as if to] say, 'Is this really possible?'"

Since Coal Run was connected to the city's water supply, a federal jury has awarded its residents $11m in damages from the city of Zanesville and Muskingum County. Now it's only a few older residents who think that when it rains it's a good time to do the laundry.

The case is used by Sir Tim Berners-Lee, the man who invented the world wide web nearly 24 years ago, as an example of the sharing, perhaps caring and certainly egalitarian principles realised by means of his invention. At a recent Ted talk, Berners-Lee also cited as evidence of the help the web can be to humanity the case of GeoEye, a company that shortly after Haiti's 2010 earthquake released satellite imagery of the devastated areas, with a licence that allowed people to use it. Quickly, relief workers zoomed into it – and added to OpenStreetMap details about the devastated area – to build up a picture of which roads were blocked, which buildings damaged, where refugee camps were growing and when medical ships were reaching port. "The site rapidly became the map to use on the ground if you were doing relief work," said Berners-Lee.

This sort of thing was what he hoped would be made possible after the birth of the world wide web at Cern in Geneva in December 1990. "It consisted of one web site and one browser, which happened to be on the same computer," he recalls. The simple setup demonstrated a profound concept: that any person could share information with anyone else, anywhere. In this spirit, the web spread quickly from the grassroots up.

Berners-Lee demonstrates the world wide web to delegates at the Hypertext 1991 conference in San Antonio, Texas. Photograph: Cern Photograph: Cern

"The web evolved into a powerful, ubiquitous tool because it was built on egalitarian principles and because thousands of individuals, universities and companies have worked, both independently and together as part of the World Wide Web Consortium [established by Berners-Lee so that stakeholders could work together in open groups to build a better web than any company could build by itself], to expand its capabilities based on those principles."

But, in spreading from the grassroots up, his invention has arguably lost many of the egalitarian principles Berners-Lee hoped for. It has become less straightforwardly a force for good. Earlier this month, Charles Leadbeater, former policy adviser to the Labour government and a champion of the web's potential to give power to hitherto deprived groups, published a report called A Better Web for the Nominet Trust pointing to the pervasive misogyny of the web as an example of how the democratising potential of the internet has not been fulfilled.

"There is some sense in which the internet is in danger of not meeting its potential," says Leadbeater, "the promise that was there in the mid-2000s, which was about collaborating to create better ways to do things." That promise was something Leadbeater and other Pollyanna-ish proselytisers for the web only a few years ago believed would be realised. In 2008, he published a book called We-Think: Mass Innovation, Not Mass Production; at the same time in the US, fellow web evangelist Clay Shirky published Here Comes Everybody: The Power of Organizing Without Organizations. Both stressed the internet's genesis in 60s counterculture and its historic ethos of sticking it to the Man. Both revelled in the fact that new web-based social tools helped single mothers looking online for social networks or pro-democracy campaigners in Belarus. When I reviewed these books for the Guardian at the time, I worried that neither sufficiently realised that these tools and this rhetoric could just as readily be co-opted by the Man (by which I meant profit-based organisations and overbearing governments). But arguably that is precisely what has been happening in the intervening period.

"We've had a year now in which the internet is regarded with a sort of weary cynicism by a lot of people, because Facebook are just locking you in, and others are using your data without you knowing it. Some people are enthusiastic about that, because they get really good services and they love it, but quite a lot of other people are either quite doubtful or outright sceptical," says Leadbeater.

Sceptical is right. The world wide web has increasingly facilitated the global spread of misogyny, the hate crime of revenge porn, corporate and state surveillance, bullying, racism, the life-ruining, time-wasting, Sisyphean digital servitude of deleting spam, the existentially crushing spadework of fatuous finessing of those lies, one's Facebook profiles. It has spread from the grassroots up, from Berners-Lee's desktop to the world, has been coterminous with lots of other intolerable things.

Yes, you might well reply. We can all draw up lists of how terrible our experience of online life is. But you're moaning about the internet, not the world wide web: they are two very different things. (Basically, the internet contains the web; the web is a particular pipe inside the broader "internet" pipe. "Web" tends to mean, "take these files and lay them out on a screen in a particular way"; "internet" means, "here's a file, do whatever you want with it.") Indeed, Wired magazine, only four years ago, had an all-orange cover with four black words that read: "The Web is Dead". It went on to argue that Berners-Lee's beautiful egalitarian vision had been supplanted by a customised, commercialised online paradise or hell (depending on your politics). Internet penseur Chris Anderson wrote that increasingly we're abandoning the open, unfettered web for simpler, sleeker services online that work – and make lots of money for app creators.

The Wired magazine story that argued Berners-Lee's vision had been supplanted by commercial forces. Photograph: Wired

If Anderson was to be believed, most internet users could measure out their days, not with coffee spoons, but with app usage. Consider a typical day: you check your email on your iPad before getting out of bed, browse Facebook, Twitter and the Guardian over breakfast, listen to a podcast on your smartphone on the way to the office, at work have Skype conversations, and then go home to play games on your Xbox Live, and later settle down to binge on Orange is the New Black on Netflix.

"You've spent the day on the internet – but not on the web," argued Anderson. "This is not a trivial distinction. Over the past few years, one of the most important shifts in the digital world has been the move from the wide-open web to semiclosed platforms that use the internet for transport but not the browser for display. It's driven primarily by the iPhone model of mobile computing. And it's the world that consumers are increasingly choosing, not because they're rejecting the idea of the web but because these dedicated platforms often just work better or fit better into their lives. The fact that it's easier for companies to make money on these platforms only cements the trend."

On that last point, it's worth considering the outcry that arose earlier this summer when an intriguing experiment performed on Facebook users went public. It was revealed that, for a week in January 2012, hundreds of thousands of Facebook users had between 10 and 90% of the positive emotional content removed from their newsfeeds (a newsfeed is the selection of friends' posts that appear on your homepage when you log in to Facebook). The removals were part of a study by three researchers – two US academics and a Facebook employee – into what they called "emotional contagion via social networks". The study found that reducing the number of emotionally positive posts in someone's newsfeed produced a statistically significant fall in the number of positive words they used in their own status updates and a slight increase in the number of negative words. "These results suggest that the emotions expressed by friends via online social networks influence our own moods, constituting … the first experimental evidence for massive emotional contagion via social networks."

Have we become patsies whose moods can be altered to boost Facebook’s revenues? Photograph: Alamy

The outrage was over the possibility that Facebook might use such emotional contagion more widely to alter the moods of its users, like a Big Brother looking to maximise shareholder dividends by means of mind control. There was a disgust at the possibility that Facebook wanted to make us happier on their site so that we'd stay there longer, be exposed to more ads whose revenue would be passed on to Facebook so that Mark Zuckerberg can buy more yachts than you've had hot dinners. A loathsome business model, premised on sucking from us our most valuable and irreplaceable commodity – time. But, for Thomas Jones, who wrote about the mood-altering Facebook experiment for the London Review of Books, such outrage was naive. Facebook does this sort of stuff all the time, he pointed out. "The purpose of Facebook is to harvest, organise and store as much personal information as possible to be flogged, ready-sifted and stratified, to advertisers." He added: We aren't Facebook users, we're its product."

But have we become patsies whose moods can be altered like lobotomised lab rats to boost Facebook's revenues? Is that what Berners-Lee had in mind in Cern a quarter of a century ago? Again, Jones saw naivety in the premise of such questions. "Your newsfeed is constantly being refined and adjusted to show you what you most want to see – so you'll stay on the site for longer, hand over more information about yourself, and see more ads that you're more likely to click on." We are, to put it another way, complicit in our online downfall, choosing the very services that diminish us. Maybe that is what the internet is, but it certainly isn't what the world wide web was supposed to be.

No wonder, them, that Berners-Lee recently took a pop at Facebook against taking over the web. "There's this huge corporate pushback," he warned. "We're seeing things in the balance." What he excoriated most was internet giants like Facebook and Twitter treating certain kinds of online traffic differently from others. He calls for net neutrality, which means that internet service providers would be obliged to treat anything – from emails to websites – equally, rather than charging users more for access and services, making it harder for us to communicate freely online, to share data and so make stuff there incomprehensible to those whose minds are dominated by the profit motive. He rounded on Facebook, which has made a lot of noise over its plans extending web access to the developing world for making such connectivity conditional on facilitating the greater domination by Facebook of the digital world. Or as he put it pithily to Zuckerberg: "Don't you dare make a phone that can only go to Facebook.com."

How this ideological struggle plays out remains to be seen. But, given the ruthless success of capitalism, a betting man wouldn't put his money on a guy like Berners-Lee, who isn't in this for money. When his invention went live in Geneva all those years ago, he didn't envisage his open web would become a system of semi-closed platforms that restrict access to their users. Nor did he envisage that his invention would facilitate surveillance on a scale beyond the imaginings of Orwell. At its inception the world wide web seemed to promise an escape from corporate and governmental powers, an egalitarian free-for-all. Now? It has increasingly become a sophisticated extension of them. The hopes once nurtured by the man who invented the web have been not so much abandoned as betrayed.