Google will run entirely on renewable energy from as early as next year, the company has announced.

The offices of the tech giant use as much energy as the US city of San Francisco but now its energy needs are set to be met by wind farms and solar panels.

Although the company’s reliance on national power grids means it cannot be powered entirely by renewable producers, it offsets its use of carbon-based energy by purchasing renewable energy from different sources.

Google has made deals with a number of renewable energy suppliers, allowing these firms to invest in new infrastructure and enabling Google to say it purchases from renewable sources the equivalent of the fossil fuel energy it uses.

The US-based company currntly invests in 20 renewable energy projects across the world, including in the USA, Chile and Sweden, offsetting the money it spends on fossil fuels.

The tech giant said in an online blog that its success in meeting its goal of 100 per cent renewable energy was “just the beginning”.

Urs Holzle, the company’s senior vice president for technical infrastructure, said: “We began purchasing renewable energy to reduce our carbon footprint and address climate change – but it also makes business sense.

“I’m thrilled to announce that in 2017 Google will reach 100% renewable energy on our global operations.

“Our ultimate goal is to create a world where everyone – not just Google – had access to clean energy."

The company said having a supply of renewable power protected it against price swings in other forms of energy, such as oil, and allowed it to plan better.

First pictures of Google's new offices in King’s Cross Show all 7 1 /7 First pictures of Google's new offices in King’s Cross First pictures of Google's new offices in King’s Cross Google's new Kings Cross office On Monday June 20, around 800 software engineers will be the first of 2,500 Google employees to relocate in the brand new 371,000 square feet, 11 storeys office, designed by Allford Hall Monaghan Morris (AHMM). Tom Soar First pictures of Google's new offices in King’s Cross Google's new Kings Cross office The 11-storey office has been leased by Google from BNP Paribas Real Estate last year. Tom Soar First pictures of Google's new offices in King’s Cross Google's new Kings Cross office Andrei Popescu, one of Google’s UK Engineering Directors said: “The UK has an incredible amount of engineering talent and as our team grows and we have this incredible new working space, we’re looking for more talented programmers to join us in London." Tom Soar First pictures of Google's new offices in King’s Cross Google's new Kings Cross office The staff at 6 Pancras Square will work on some of Google's best-known products. Tom Soar First pictures of Google's new offices in King’s Cross Google's new Kings Cross office Google’s new office has been built with sustainability and healthy materials in mind. The project also pioneered the Healthy Materials Program, an initiative developed with the goal of eliminating harmful compounds from Google offices to create a healthier space with improved air quality. Tom Soar First pictures of Google's new offices in King’s Cross Google's new Kings Cross office The new facilities will also include a running track and sleeping pods. Tom Soar First pictures of Google's new offices in King’s Cross Google's new Kings Cross office Around 800 engineers will move in during the first phase and there will be a total capacity of 2,500 after the second phase is complete later this year. Tom Soar

In total Google consumed 5.7 terawatt-hours of electricity last year – enough to power a city of almost 300,000 people.

The company claims its spending on renewable energy will result in infrastructure investment of $3.5 billion (£2.8 billion) across the globe, two thirds of which will be in the US. It also says it is the world’s biggest corporate buyer of renewable power.

Jonathan Koomey, an energy and environment lecturer at Stanford University, told the New York Times: “For one company to be doing this is a very big deal. It means other companies of a similar scale will feel pressure to move.”

However, other commentators suggested the announcement was a gimmick and pointed out that Google’s offices would still be powered by fossil fuels.

Google's headquarters in Mountain View, California, contain more than 10,000 employees. The company also has 13 data centres and 70 offices across the world, housing thousands of staff and hundreds of thousands of computers.