Buildings consume approximately one-third of the energy used in developed countries, with much of this energy tied to building heating and cooling. Electrochromic “smart” windows have the potential to mitigate some of this energy use through on-demand modulation of solar energy transmission. Therefore, electrochromic window devices based on low cost and facile solution-based processing routes are sought. In this work, we describe the electropolymerization and deposition of electrochromic poly(arylamine) thin films with exceptional broadband solar transmittance modulation, reaching ΔT sol values of over 60% (Figure 1). Through high-resolution, near-field spectroscopic imaging we show that the structure of the acid dopant present in the electrodeposition solution plays a key templating role that determines the electrochromic performance of these films. Our findings indicate that polyanionic dopants are especially adept at directing polymer chain conformational order, which in turn improves charge delocalization and transport. These factors lead to films with high smoothness and optical clarity through the visible (T lum > 80%) and near-infrared ranges. Further details regarding the cycling stability of these films and their integration into full electrochromic devices will be discussed. In summary, this work demonstrates the value of polyanionic dopants for templating high quality electrochromic polymer thin films capable of energy-relevant solar transmittance modulation for smart window applications. Figure 1