Image copyright CARBON ENGINEERING Image caption How a large-scale carbon dioxide capture plant might look

Making diesel out of thin air sounds like something from science fiction.

But small companies in Germany and Canada are doing precisely this - capturing carbon dioxide (CO2) and finding ways to sell it.

German company Sunfire produced its first batches of so-called e-diesel in April. Federal Minister of Education and Research, Johanna Wanka, put a few litres in her car, to celebrate.

And the Canadian company Carbon Engineering has just built a pilot plant to suck one to two tonnes of carbon dioxide from the air daily, turning it into 500 litres of diesel.

The process requires electricity, but if the start-ups use renewable electricity they can produce diesel that is carbon neutral.

In other words, burning it in your car only returns to the atmosphere the CO2 removed in the first place.

Image copyright CARBON ENGINEERING Image caption Carbon Engineering's pilot plant in Calgary, Canada

Fossil fuels, on the other hand, add to the total amount of CO2 in the atmosphere.

And halting the growth of CO2 and other greenhouse gases has become of paramount importance given the many threats posed by climate change.

The concentration of CO2 in the air reached 400 parts per million in 2012-2013 - the highest since scientific measurements began. And the year July 2014-June 2015 was the warmest on record, says the US National Oceanic and Atmospheric Administration.

Elemental chemistry

The chemistry to make fuel from CO2 isn't especially hard - split water into hydrogen and oxygen through electrolysis, add the hydrogen to CO2 to make carbon monoxide and water, then bung in more hydrogen to build up hydrocarbon chains.

This last bit's called the Fischer-Tropsch process, and dates back to the 1920s.

But it's the technologies capturing the CO2 straight from the air that are new and now becoming cheap enough to be viable.

The biggest technological challenges have centred on the high-temperature furnaces, says Adrian Corless, chief executive of Carbon Engineering.

Image copyright Thinkstock Image caption There is no sign of the world losing its appetite for fossil fuels anytime soon

He says there is still "a month of hard work" to get these to work as the company would like.

But these also have been his company's chief innovation, he says - precipitating captured CO2 into solid calcium carbonate pellets that can be easily washed and dried.

These pellets are then heated to 800-900C, whereupon they release a pure CO2 stream. As a residue, they leave calcium oxide which, handily, can be fed back in to the first air capture stage.

Fizzy drinks

Besides fuel, there are other options for selling captured CO2.

Swiss company Climeworks, spun off from a local university, is readying its first commercial-scale plant, selling captured CO2 to a nearby greenhouse.

Image copyright Getty Images Image caption CO2 captured from air could also be used for fizzy drinks

Climeworks sees a long-term market in supplying fizzy drinks bottlers in Africa, Japan, and hard-to-reach islands, by setting up locally and beating transport costs.

The expense of compressing, liquefying, and shipping carbon CO2 is up to 10 times more in such places, says Dominique Kronenberg, the firm's chief operating officer.

It is certainly easier to remove CO2 from the exhaust of fossil fuel-burning plants than capture it from the air, because exhaust streams from gas and coal plants contain 3% and 15% CO2 respectively.

Air, by contrast, contains about 400 parts per million of CO2.

Image copyright Climeworks Image caption Climeworks says its demonstrator machine can extract 8kg of CO2 from the air each day

So why bother?

"We don't have to purify exhaust gases from a boiler or coal - these have a lot of sulphur and other molecules that might be difficult to purify out," says Mr Kronenberg.

Another attraction of air capture is it that it is easier to extract the CO2 this way than from the exhaust gases of cars and other forms of transport, says Mr Corless.

Price at the pump

But could e-diesel ever compete with fossil fuels on price?

Sunfire estimates its e-diesel will sell for €1-€1.5 (73p-110p) per litre - slightly cheaper than the current UK diesel pump price of 119p per litre.

Image copyright PA Image caption E-diesel would be compatible with the hundreds of millions of diesel vehicles already on the road

But a lot depends on government policy. The actual price of the fuel can be as low as 30% of what we pay at the pump - the rest of the cost is made up of fuel duty, VAT, and the retailer's profit margin.

"So we assume certain taxes might not be applied to these renewable fuels we produce," says Mr Kronenberg, perhaps more in hope than expectation.

In the US and the UK there are government initiatives to reduce greenhouse gas emissions through the use of cleaner transport fuels.

But it's the cost of electricity that could make or break e-diesel's commercial viability, because the process requires a lot of energy.

Image copyright Imperial College/Dave Guttridge Image caption Imperial's Dr Paul Fennell says it's more efficient to use electricity to power electric vehicles

''You can take electricity and convert it to fuel for your vehicle with about 13% efficiency," explains Dr Paul Fennell, reader in clean energy at Imperial College London.

"If you compare that to taking electricity and charging up an electric vehicle, then that can be done with about 80% efficiency," he adds.

Zero carbon

But Mr Corless points out that "in the last two or three years, the cost of renewable electricity has dropped dramatically - especially solar."

And another point in e-diesel's favour is that there are hundreds of millions of diesel vehicles already on the road, so at least this cleaner fuel could help ease the transition to zero carbon transport while we wait for an electric or hydrogen charging infrastructure to be built.

Image copyright AFP/GETTY IMAGES Image caption The US Navy is interested in using e-diesel to power its ships

Climeworks and Carbon Engineering say their modular technology will make it very easy for them to scale up to larger projects.

Meanwhile, the US Naval Research Laboratory says it's interested in using e-diesel to fuel its ships.

So you never know, your car may be running on fuel made from thin air sooner than you expect.