© 2022 Elsevier B.V.The UV-absorbing and non-fogging glass coatings containing carbazole-based conjugated backbone with different lengths of hydrophilic PEG subunit (KP-PEG) were produced. The characterizations of the polymers were carried out by using different techniques such as FT-IR, 1H NMR, GPC, TGA and DSC. Transmittance and thin-film morphology analyses, which are essential for UV protection and wettability, were investigated by UV–Vis absorption, AFM and TEM techniques, respectively. Transparent thin films prepared by the polymer solutions in chloroform were obtained by spin coating method at a scan rate of 2000 rpm. The wettability performance and antifogging properties of these surfaces were investigated depending on the PEG length in the polymer subunit. The water contact angle of the surfaces was improved to the range between 60° and 29° depending on the amount of PEG group. KP-PEG750 is the best polymer thin film in terms of having the highest roughness, optimum UV absorption and the low contact angle value.