Sir Tim was speaking at the Web Summit conference in Lisbon - AP

Sir Tim Berners-Lee has launched a "Magna Carta for the web", warning that tech giants must change their ways to save the online world from the dangerous forces they have unleashed.

Sir Tim, who invented the World Wide Web in 1989, called for a "revolution" in how the internet is regulated and monetised in order to stem abuse, political polarisation and fake news.

The 63-year-old was speaking at the Web Summit in Lisbon to launch a new "contract for the web" which asks internet companies to uphold a set of principles such as protecting privacy and being transparent about their algorithms.

Facebook and Google have backed the contract, which will be agreed in detail next year, despite both companies being mentioned by its creator as examples of how "the web we know and love" is under threat.

Sir Tim said: "For the first 15 years, most people just expected the web to do great things. They thought 'there'll be good and bad, that is humanity, but if you connect humanity with technology, great things will happen....

"What could go wrong? Well, duh: all kinds of things have gone wrong since. We have fake news, we have problems with privacy, we have problems with abuse of personal data, we have people being profiled in a way that they can be manipulated by clever ads."

Sir Tim, who developed the Web as a "side project" while working at the Cern research laboratory in Switzerland in the Eighties, has become increasingly vocal about what he sees as a perversion of his original vision.

He recently warned that tech giants such as Amazon and Google may have to be broken up in order to prevent them from amassing too much power, and has launched a project to decentralise data storage.

“I am disappointed with the current state of the Web. We have lost the feeling of individual empowerment and to a certain extent also I think the optimism has cracked," he told Reuters.

The new contract has been developed by the World Wide Web Foundation, which Sir Tim founded, to mark the imminent moment at which half of the world's population will be online. Other supporters include Richard Branson, Gordon Brown, the French government and the cybersecurity firm Cloudflare.

Story continues

A key goal is to expand cheap internet into the third world, where users pay up to nine times more for a single gigabyte of data, relative to their incomes, than they do in North America or Europe.

Standing with Sir Tim on stage, Jacqueline Fuller, Google's head of philanthropy, said: "We think the best way to deal with these challenges is to come together collectively and work together collaboratively... we're very supportive of the new contract."

But some of its principles may be difficult for tech companies to honour. For example, the Foundation criticised companies that harvest people's data without their knowledge or consent, citing allegations that Google has been recording location data from Android users even when they have turned location history off.

In its section about online bullying and abuse, it mentions Facebook's alleged role in spreading violence in Burma and India. It also asks companies to "ensure governments respect people's rights online", even though Google has faced an internal revolt over plans to build a censored search engine for Chinese users.

It also pointedly asks signatories to uphold net neutrality, the idea of treating all internet traffic equally, across the whole world. Both Google and Facebook have defended net neutrality in the USA, but Facebook's "free basics" internet service for the third world has been banned in India because it only allows users to access approved products.

Nevertheless, Mr Berners-Lee said he was optimistic about the future of the internet. "The ad-based funding model doesn't have to work in the same way. It doesn't have to create clickbait. It doesn't have to be that you only get a programming job in order to distract your users from what they want to do," he said.

"These people are going to step back and they're going to put aside all the myths that they're currently taking as just being part of the way things work... people like you, who are actually building the web, taking things into their own hands."