Biology uses various cross-linking mechanisms to tailor material properties, and this is inspiring technological efforts to couple independent cross-linking mechanisms to create hydrogels with complex mechanical properties. Here, it is reported that a hydrogel formed from a single polysaccharide can be triggered to reversibly switch cross-linking mechanisms and switch between elastic and viscoelastic properties. Specifically, the pH-responsive self-assembling aminopolysaccharide chitosan is used. Under acidic conditions, chitosan is polycationic and can be electrostatically cross-linked by sodium dodecyl sulfate (SDS) micelles to confer viscoelastic and self-healing properties. Under basic conditions, chitosan becomes neutral, the electrostatic SDS–chitosan interactions are no longer operative, and chitosan chains can self-assemble to form crystalline network junctions that serve as strong physical cross-links that confer elastic properties. Mechanical measurements performed in water demonstrate these different mechanical behaviors and the repeated pH-induced switching between these behaviors. Printing of SDS micelles onto a neutral chitosan film allows the cross-linking mechanisms to be spatially programed to confer anisotropic mechanical properties. The reversibility of these cross-linking mechanisms allows the patterned films to be erased and reprogramed with reconfigured mechanical properties. Potentially, the ability to reversibly program hydrogel networks enables fabrication of the dynamically reconfigurable networks required for soft machines.