Evaporative cooling and radiative cooling are considered to be energy-saving and environmentally friendly cooling technologies. However, the evaporative cooling system requires complex external water supply equipment, and the radiative cooling is susceptible to weather, which hinder the practical application. Herein, TiO2 was used as the photo-initiator and spectral regulator, and a hydrogel integrating radiative cooling and evaporative cooling was prepared by combining photopolymerization with semi-acidification sol–gel transition method. The obtained hydrogel shows good mechanical strength (elongation at break > 600 %, and fracture stress > 200 kPa), high visible reflectance (>80.0 %) and emissivity in atmospheric window band (>90.0 %). At the same time, due to the introduction of hygroscopic agent CaCl2, it can replenish water itself at night. In outdoor experiment, the hydrogel showed a cooling effect of up to 12.5 °C, showing a significant potential for reducing energy consumption in cooling applications. In addition, the synthesis process of hydrogel is green, which aligns with environmental safety and sustainability goals. This study provides a new strategy for developing efficient, environmentally friendly, and low-cost passive coolers to reduce the global energy burden.