A key characteristic of programmable hydrogels is that their physical and chemical properties can be changed postsynthetically. In order to achieve this, we used sub-50 nm photoacid/base generator nanoparticles, which could alter the charge density/polarity of a host macroscopic hydrogel (e.g., polyacrylamide). The photoacid generator (PAG) nanoparticles, were composed of poly(methyl methacrylate-co-4,5-dimethoxy-2-nitrobenzyl methacrylate-co-1,6-hexanediol diacrylate) and exhibited a pH-dependent swelling behavior when they were irradiated with UV light. Thus, using PAG nanoparticles enabled space-selective light-triggered swelling of host hydrogels by increasing the charge density at alkaline pH. Using photobase generator (PBG) nanoparticles, consisting of poly(methyl methacrylate-co-2-nitrobenzyl methyl 4-methacryloyloxy piperidine-1-carboxylate-co-1,6-hexanediol diacrylate), it was possible to space-selectively produce positive charge, at acidic pH, within the host hydrogel network. PBG nanoparticles added several functionalities to the host hydrogel, including reversible writing/erasing patterns as well as postpolymerization in desired sites. Including mixtures of PAG and PBG nanoparticles caused deswelling of the host hydrogel upon UV-irradiation. By increasing the mass fraction of PAG/PBG nanoparticles within the hydrogel, the deswelling effect was limited only to the top surface area, resulting in a monolayer actuator with a large bending angle. This study has successfully demonstrated the excellent potential of using PAG/PBG nanoparticles to confer photoresponsive behaviors that transform nonresponsive hydrogels into responsive hydrogels on demand. This system could be spatially tailored to provide a wide range of useful properties such as initiation sites for synthesis, writing/erasing, and actuation.