Photoswitchable molecules are supposed to be incorporated into mechanically stable porous membranes based on silica (SBA-15) and Al2O3, altering the free space of the pores upon the photo-induced trans-cis transition. These membranes will be utilized as nanofilters for the separation of molecules by size in gaseous and/or liquid mixtures. The selectivity of the filters will be achieved by gas chromatography and/or infrared spectroscopy.