Interfacial solar water evaporation (ISWE) technology provides a green, energy-saving and economical way to sustainably produce freshwater from various water sources for addressing the impending water shortage. However, the low evaporation rate, complex manufacturing process and harmful surface salt accumulation for ISWE are still challenging and considerably restricted the practical applications. Herein, we design and fabricate a robust ISWE based on the hierarchical Co3S4 nanostructure as a photothermal absorber and three-dimensional (3D) nickel foam (NF) as a primary structure with macroporous networks. The as-fabricated Co3S4/NF not only introduces sufficient photothermal centers to convert solar energy into heat, but also provides abundant channels for water transportation and steam escape. The Co3S4/NF evaporator exhibits a high evaporation rate of 1.56 kg m−2 h−1 and a photothermal conversion efficiency up to 94.18 % under one-sun illumination. Moreover, such evaporator shows the long-term durability and good salt-resistant ability, which can sustainably produce freshwater from various water sources including seawater, saline water, lake water and other contaminated water. The photothermal Co3S4/NF evaporator would provide a promising platform for the production of drinkable water in a safe and sustainable manner.