> Hydrogen must be separated from water using electrolysis. That requires energy. Where did the energy come from? <
That’s an excellent question, and one you’re not supposed to ask.
And for the curious, here’s the answer. It doesn’t look like a very green process.
https://en.wikipedia.org/wiki/Steam_reforming
Good info. But the bottom line is that there is no free hydrogen. The byproduct of burning it is harmless water vapor, but hydrogen itself is a byproduct of other processes that are not exactly “green”.