Hydrogen fuel cell cars could help solve the global warming crisis, but nobody wants to buy them. Yoshikazu Tanaka, chief engineer of the Toyota Mirai, Toyota’s hydrogen fuel cell car, calls it a “chicken or the egg” problem: no one wants to purchase hydrogen cars because there are no hydrogen fuel stations, and nobody wants to build hydrogen fuel stations because there are no hydrogen cars.

But Toyota thinks it may have found a solution. For unlimited clean energy, it’s turning to one of the dirtiest places there is: the toilet.

In Fukuoka, Japan, the automaker is converting human waste into hydrogen to fuel the Mirai. The process is pretty simple. At a wastewater treatment plant, like the Fukuoka City Central Water Processing Plant, sewage is separated into liquid and solid waste. The solid waste, called sewage sludge, is exactly what it sounds like: a foul-smelling, brown lump. Most sewage sludge is thrown in landfills.

But in Fukuoka, microorganisms are added to the mix. These microorganisms break down the solid waste, creating biogas, about 60% methane and 40% carbon dioxide. Then, workers filter out the CO₂ and add water vapor, which creates hydrogen and more CO₂. They extract the CO₂ again, and voila: pure hydrogen.

“It’s not a new or advanced technology,” says Marc Melaina, a senior engineer at the National Renewable Energy Laboratory in Denver. “In India, they have loads of biogas plants in villages and such that are just part of their energy infrastructure.”

If Tanaka has his way, Japan and the U.S. will soon follow suit. Currently, the Fukuoka plant produces 300 kilograms of hydrogen per day, enough to fuel 65 Mirai vehicles, Tanaka says. If all the biogas produced by the plant were converted to hydrogen, that number would jump to 600 cars per day. It’s a far cry from enough to achieve his goal of a “hydrogen society” that has no need whatsoever for fossil fuels, but it’s a good first step. Ideally, the process would be implemented in a scaled-up fashion at the wastewater processing plants of the world’s biggest cities.

Using wastewater is arguably the greenest way to make hydrogen, especially for big cities, where there are a lot of people who produce a lot of sewage, and most of that sewage, after it’s been treated, is discarded. In the case of sewage sludge, it’s usually dumped in landfills, and in the case of biogas it’s most often burnt. In other words, there’s no downside to using it to produce hydrogen instead. “They have to treat the water, and biogas is a natural byproduct of that process,” Melaina says. “You can burn it, you can turn it into electricity or you can turn it into hydrogen.”

Making hydrogen from sewage is “probably one of the most economical ways down the line because you’re producing so much from a waste product,” says Bill Elrick, executive director of the California Fuel Cell Partnership.

Biogas, which is renewable, is also a better source of hydrogen than natural gas, which is where we get most of our hydrogen today. “Biogas itself is really chemically almost identical to natural gas. If you clean it up and take out the impurities it’s basically methane,” Melaina says.

Compared to other zero-emissions vehicles, like electric battery cars, hydrogen vehicles also stand the best chance at convincing consumers to give up their gas-guzzlers, says Joan Ogden, co-director of Hydrogen Pathways Program at UC Davis. That’s because, behaviorally, they’re a lot like the gasoline cars we’re used to. ”Fuel cell cars do offer you things that battery cars can’t in terms of the ease of use, in terms of fast refueling time, and in terms of a longer range and a bigger car,” she says. And, she says, hydrogen vehicles should be “within a few thousand dollars of gasoline cars within the next 10 years.”

Biogas could help solve hydrogen’s “chicken or the egg” problem. “There’s only some few hundred Mirais in the state of California right now,” Elrick says. “That’s not enough to turn it into a full business from Toyota’s perspective or the energy producers’ perspectives.”

Japanese and American consumers are accustomed to being able to go to any gas station and buy fuel to power their cars. Outside of a few major cities in Japan, hydrogen car drivers can’t do that. In California, there are around 20 hydrogen refueling stations, but almost all of them are in or around Los Angeles or the San Francisco Bay area. Currently, there’s exactly one hydrogen refueling station between those two cities, in Harris Ranch, California. Given that the Mirai has a range of about 312 miles, long road trips are currently out of the question.

But where there’s poop there’s people, which is what makes a plant like the one in Fukuoka so attractive. If every town with a sewage treatment plant also had a hydrogen production facility, supplying hydrogen to far-flung locales would become trivially easy.

For now, though, it’s still a waiting game: waiting on more stations to be built, and waiting for consumer demand for zero-emissions vehicles to take off. But Toyota is hoping that its toilet-to-tank scheme might reduce those wait times, just a bit.