Thin, porous films of WO3 were fabricated by solution-based synthesis via spin-coating using polyethylene glycol (PEG), a block copolymer (PIB50-b-PEO45), or a combination of PEG and PIB50-b-PEO45 as structure-directing agents. The influence of the polymers on the composition and porosity of WO3 was investigated by microwave plasma atomic emission spectroscopy, energy-dispersive X-ray spectroscopy, scanning electron microscopy, X-ray diffraction, and gas sorption analysis. The electrochromic performance of the WO3 thin films was characterized with LiClO4 in propylene carbonate as electrolyte. To analyze the intercalation of the Li+ ions, time-of-flight secondary ion mass spectrometry, and X-ray photoelectron spectroscopy were performed on films in a pristine or reduced state. The use of PEG led to networks of micropores allowing fast reversible electrochromic switching with a high modulation of the optical transmittance and a high coloration efficiency. The use of PIB50-b-PEO45 provided isolated spherical mesopores leading to an electrochromic performance similar to compact WO3, only. Optimum characteristics were obtained in films which had been prepared in the presence of both, PEG and PIB50-b-PEO45, since WO3 films with mesopores were obtained that were interconnected by a microporous network and showed a clear progress in electrochromic switching beyond compact or microporous WO3.