A non-conventional way of preparation of lightweight porous materials by templating hydrogels with a range of hydrophilic and hydrophobic scaffolding materials was explored. Sub-millimetre hydrogel slurries of polyacrylamide and gellan gum were templated with aqueous slurries of cement, gypsum and clay–cement mixtures or alternatively, dispersed in curable polydimethylsiloxane (PDMS). After the solidification of the scaffolding material, the evaporation of structured hydrogel produced porous composite material whose pores mimic the hydrogel meso-structure. We studied the density, volume contraction and the compression strength of the formed porous materials as function of the hydrogel initial volume fraction. This versatile hydrogel templating method can be applied very inexpensively to a range of scaffolding materials to yield lightweight porous materials with a great potential for use in the building industry in heat and sound insulation panels, an alternative to aerated concretes, lightweight building blocks, porous rubber substitutes and foam shock absorbers.