A ceramic membrane makes it possible to produce compressed hydrogen from methane with near-zero energy loss.