Meso- and microporous melamine resins were synthesized via hard-templating of silica nanoparticles. The porous structure was characterized by X-ray scattering, gas sorption methods and electron microscopy. Ultramicroporosity was proven in CO2-sorption measurements. Porosities up to 61% and surface areas up to 250 m2 g−1 were achieved.