AbstractPolymer electrolytes are being considered as an effective solution for electrochemical devices to replace currently used organic liquid electrolytes due to their excellent mechanical properties and security. Herein, we prepared stretchable polymer electrolytes (SPEs) doped with poly[(2‐acrylamido‐2‐methylpropanesulfonic acid)‐co‐poly(ethylene glycol) dimethacrylate] (P(AMPS‐co‐PEGMA)) and enhanced with poly[(vinylidene fluoride)‐co‐hexafluoropropylene] (PVDF‐HFP), through UV in situ polymerization. The SPEs showed good mechanical performance with an elongation of more than 40% and ionic conductivity reaching the order of 10−3 S cm−1. In terms of application, flexible electrochromic devices based on the UV in situ‐prepared SPEs were assembled, the color switching performance being still good even after 400 switching cycles and 1000 bending cycles, which indicated that the SPEs could have excellent prospects in application for flexible devices. © 2023 Society of Industrial Chemistry.