Herein, we describe the preparation of patterned photoresponsive hydrogels by using a facile method. This polymer-network hydrogel coating consists of N-isopropylacrylamide (NIPAAM), cross-linking agent tripropylene glycol diacrylate (TPGDA), and a new photochromic spiropyran monoacrylate. In a pre-study, a linear NIPAAM copolymer (without TPGDA) that contained the spiropyran dye was synthesised, which showed relatively fast photoswitching behaviour. Subsequently, the photopolymerisation of a similar monomer mixture that included TPGDA afforded freestanding hydrogel polymer networks. The light-induced isomerisation of protonated merocyanine into neutral spiropyran under slightly acidic conditions resulted in macroscopic changes in the hydrophilicity of the entire polymer film, that is, shrinkage of the hydrogel. The degree of shrinkage could be controlled by changing the chemical composition of the acrylate mixture. After these pre-studies, a hydrogel film with spatially modulated cross-link density was fabricated through polymerisation-induced diffusion, by using a patterned photomask. The resulting smooth patterned hydrogel coating swelled in slightly acidic media and the swelling was higher in the regions with lower cross-linking densities, thus yielding a corrugated surface. Upon exposure to visible light, the surface topography flattened again, thus showing that a hydrogel coating could be created, the topography of which could be controlled by light irradiation.