Counteracting surface fogging to maintain surface transparency is significant to a variety of applications including eyewear, windows, or displays. Energy-neutral, passive approaches predominately rely on engineering the surface wettability, but suffer from nonuniformity, contaminant deposition and lack of robustness, all significantly degrading their durability and performance. Here, guided by nucleation thermodynamics, we design a transparent, sunlight-activated, photothermal coating to inhibit fogging. The metamaterial coating contains a nanoscopically thin percolating gold layer and is most absorptive in the nearinfrared range, where half of the sunlight energy resides, thus maintaining visible transparency.The photoinduced heating effect enables sustained and superior fog prevention (4-fold improvement) and removal (3-fold improvement) compared to uncoated samples, and overall impressive performance, in-and outdoors, even under cloudy conditions. The extreme thinness (~10 nm) of the coating-produced with standard, readily scalable fabrication processesenables integration beneath existing coatings, rendering it durable even on severely compliant substrates.