A major challenge in silica membranes for gas separation is to maintain a robust pore structure in the presence of steam. In this work, use of a carbonized template is proposed to reduce damage to the pore structure by inhibiting silica migration along the membrane pore surface. This departs from the conventional wisdom of creating hydrophobic surfaces to achieve hydrostability. The carbonized-template molecular sieve silica (CTMSS) membranes can then be applied to clean-energy systems such as hydrogen separation and carbon dioxide sequestration, and membrane reactors where steam is present.