Nanoporous carbon (nPorC) is a form of carbon processed to have pores producing a high ratio between the available surface area and the volume. nPorC can be prepared from organic natural (wood, nutshells, peat, lignite, coal, and petroleum coke) and synthetic (polyacrylonitrile, polyvinylidene chloride, polyvinyl chloride, and polyfurfuryl alcohol) and inorganic (metallic carbides) precursors while the pre-treatment of the natural precursors generally involves a reaction with a chemical reagent. The activation generally involves a thermal decomposition in the inert or oxidative atmosphere, while for metallic carbides the removal of reaction wastes is conducted with a hydrogenation. The macrostructure of the nPorC can be templated (for instance with a mesoporous silica template) when the outcome (nPorC) is obtained after a supplementary step (of washing with a solvent) for removing the template. On one hand, zeolites are another group of porous structures, and on the other hand, are used as templates to provide nPorC.