A flexible electrochromic device is reported by using polyaniline (PANI) doped with dl-camphor-10-sulfonic acid (CSA)/poly(styrene sulfonic acid) (PSS) as coloring electrodes and poly(ethylenedioxythiophene)-poly(styrene sulfonic acid) (PEDOT-PSS) as complementary electrodes. The characterizations of the devices were performed by using cyclic voltammetric and in situ UV–vis spectroelectrochemical studies. The devices demonstrates the color change from pale yellow (−0.5V) to dark blue (+2.5V). The improvement of optical properties, such as coloration efficiency and stability on the basis of PANI doped with PSS and PEDOT-PSS. Furthermore, the optical properties keep the same as the device is situated at the bending state.