To utilize water-responsive hydrogels in biomedical devices and soft robotics, hydrogels with high response speed and good mechanical properties are required. However, fabrication of such hydrogels remains challenging. In this study, a facile method for producing a one-dimensional (1D) hydrogel with water-responsive programmable deformations was developed. A tough hydrogel fiber with an interpenetrating polymer network based on a biopolymer was synthesized using a template-directed method. A 1D hydrogel that shrinks quickly in contact with water was fabricated by simply stretching and drying the hydrogel fiber under ambient conditions. The fabricated 1D hydrogel exhibited excellent mechanical properties, accurately controlled and programmable deformations, and an extraordinarily high degree of deformation with dimensional changes greater than 300%. Based on such 1D hydrogels, one-way soft actuators, which can be bent or can lift a weight when exposed to water, and a chemical sensing platform, which can detect ethanol in a water–ethanol mixture, were developed.