In this paper, we present a novel actuation technique of diffractive optics based on magnetic interaction forces, permitting a fine resolution tuning as well as a tuning in discrete steps. This actuation combines advantages of “analog” and “digital” tuning in conventional diffractive optics. The application of a magnetic field perpendicularly to the beams of a freestanding grating coated with magnetic material generates intermagnet forces causing these beams to deform slightly or to clump together. A theoretical analysis of the forces has been carried out, followed by actuation simulations in both linear and nonlinear regimes for different types of gratings, showing examples of exponential and parabolic chirp profiles in addition to beam clumping. In experiment, the diffraction patterns of distinct fabricated gratings have shown both a continuous shift and smear as well as a discrete change in the diffracted angles proving the concept of analog and digital tuning.