3-d solar steam evaporators with efficient water purification performance have received increasing attention recently. Herein, porphyrin-PEG (PP-PEG) containing foams with good photothermal conversion properties are prepared. The PP-PEG foams achieve an evaporation rate of 4.89 kg m−2 h−1 under 1 sun.