The moiré effect arises from the superposition of periodic structures with differences in periods or angles. Although the moiré effect can be exploited as an intriguing tool to fabricate complex metastructures, reduction of the moiré effect can be an important issue in display technology that uses many optical films with periodic patterns. Because of the superposition, dark and bright regions can be seen by the naked eye, which is a reason for the degradation of the visual quality. In this work, the lateral deformation of shape edges of prism films is harnessed to reduce the moiré effect. After the preparation of a microprism array with hydrogel materials, the hydrogel microprism array is swelled via penetration of water molecules into the hydrogel networks. Due to the compressive stress applied by volume expansion with confinement, only the sharp edges laterally buckle randomly. The swollen hydrogel prism array is replicated by photopolymerization, and prism arrays with laterally buckled edges are obtained. The randomized edges help reduce the moiré effect of the optical film when the prism array is overlapped with other periodic devices, such as other prism arrays or display devices consisting of microscale pixels, without a significant decrease in the optical performance.