HAMBURG, Germany — With its sleek architecture, the gas station in this city’s famous warehouse district hints at the future of fueling.

A small laboratory with tubes and tanks, turbocharged with electricity, stands in place of the usual cash registers and snacks. Two stark white pumps are ready to dispense hydrogen, a clean fuel without the climate-harming emissions of gasoline or diesel.

All the place lacks is customers. On a recent spring day, the only people using the pumps were employees, learning to fill the company car.

A Swedish energy company, Vattenfall, built the station at a cost of 6 million euros in 2012, anticipating growing numbers of hydrogen-powered cars, and especially buses, that would guzzle large volumes of the fuel. But hydrogen is still stuck in the prototype stage, struggling with high costs, competition from electric vehicles, and worries, perhaps exaggerated, about the risks.