Hydrogels are hydrophilic polymeric materials that are typically distinguished by their excellent biocompatibility, flexibility, and environmental friendliness. However, most hydrogels exhibit high swelling rates, poor mechanical stability, and low durability, which restrict their utilization in sensor applications. Herein, conductive hydrogels with a low swelling rate were fabricated by incorporating polypyrrole (PPy)/ ferric ion (Fe3+) into poly(sulfobetaine methacrylate)/itaconic acid (PSBMA-IA) based hydrogels. The abundance of unsaturated bonds on SBMA and IA macromolecules enables them to undergo addition polymerization and form their respective long chains. The carbon–carbon double bonds at both ends of Methylenebisacrylamide (MBA) can also undergo addition reactions with the double bonds of SBMA and IA, resulting in the formation of a three-dimensional interconnective network. This ultimately improves the mechanical properties of the composite hydrogel (maximum compressive stress of 66.7 kPa). Furthermore, Fe3+ ions and pyrrole monomers facilitate the formation of an additional conductive macromolecular network on the hydrogel skeleton through in situ polymerization. This dual network structure confers enhanced anti-swelling properties (minimum swelling rate of 33 %), and excellent electrical conductivity (>0.2 S/m). As a result, the PSBMA-IA-PPy/Fe3+ based hydrogel sensors exhibit low detection (0.543 ∼ 2.717 kPa), high sensitivity (1.4853 ∼ 1.8316), and excellent response and recovery times (<106 ms).