A nanofilter for filtering air or liquid comprising inorganic nanowires impregnated into a substrate, wherein (a) the inorganic nanowires comprise titania (TiO2), zinc oxide (ZnO), silica, tin oxide, alumina (Al2O3), or combinations thereof, (b) the substrate is suitable for air or liquid filtration, and (c) the substrate comprises a polypropylene melt-blown non-woven material, a polyester non-woven material, a polyester polycarbonate nonwoven material, a melt-blown non-woven filtration media material, a cotton fabric, a cotton twill fabric, a tightly woven linen fabric, a cotton interlock fabric, or a combination thereof.