The ability to pattern, structure, re-shape and actuate hydrogels is important for biomimetics, soft robotics, cell scaffolding and biomaterials. Here we introduce an ‘ionoprinting’ technique with the capability to topographically structure and actuate hydrated gels in two and three dimensions by locally patterning ions via their directed injection and complexation, assisted by electric fields. The ionic binding changes the local mechanical properties of the gel to induce relief patterns and, in some cases, evokes localized stress large enough to cause rapid folding. These ionoprinted patterns are stable for months, yet the ionoprinting process is fully reversible by immersing the gel in a chelator. The mechanically patterned hydrogels exhibit programmable temporal and spatial shape transitions, and serve as a basis for a new class of soft actuators that can gently manipulate objects both in air and in liquid solutions.