Rechargeable aqueous Zn-ion batteries (ZIBs) have attracted considerable attention owing to their high theoretical capacity of 820 mA h g−1, low cost and intrinsic safety. However, the electrolyte leakage and the instability issues of Zn negative electrodes originating from side reactions between the aqueous electrolyte and Zn negative electrode not only restrict the battery stability, but also result in the short circuit of aqueous ZIBs. Herein, we report a flexible and stable N-isopropylacrylamide/sodium alginate (N-SA) gel electrolyte, which possesses high mechanical strength and high ionic conductivity of 2.96 × 10−2 S cm−1, and enables the Zn metal negative electrode and MnO2 positive electrode to reversibly and stably cycle. Compared to the liquid electrolyte, the N-SA hydrogel electrolyte can effectively form a uniform Zn deposition and suppress the generation of irreversible by-products. The assembled symmetric Zn/Zn cells at a current density of 1 mA cm−2 (capacity: 1 mAh cm−2) show a stable voltage profile, which maintains a low level of about 100 mV over 2600 h without an obvious short circuit or any overpotential increasing. Specially, the assembled Zn/N-SA/MnO2 batteries can deliver a high specific capacity of 182 mAh g−1 and maintain 98% capacity retention after 650 cycles at 0.5 A g−1. This work provides a simple method to fabricate high-performance SA-based hydrogel electrolytes, which illustrates their potential for flexible batteries for wearable electronics.