Context. Precision measurements of the Sunyaev-Zel'dovich effect in clusters of galaxies require excellent rejection of common-mode signals and wide frequency coverage. Aims. We describe an imaging, efficient, differential Fourier transform spectrometer (FTS), optimized for measurements of faint brightness gradients at millimeter wavelengths. Methods. Our instrument is based on a Martin-Puplett interferometer (MPI) configuration. We combined two MPIs working synchronously to use the whole input power. In our implementation the observed sky field is divided into two halves along the meridian, and each half-field corresponds to one of the two input ports of the MPI. In this way, each detector in the FTS focal planes measures the difference in brightness between two sky pixels, symmetrically located with respect to the meridian. Exploiting the high commonmode rejection of the MPI, we can measure low sky brightness gradients over a high isotropic background. Results. The instrument works in the range ∼1−20 cm −1 (30−600 GHz), has a maximum spectral resolution 1/(2 OPD) = 0.063 cm −1(1.9 GHz), and an unvignetted throughput of 2.3 cm 2 sr. It occupies a volume of 0.7 × 0.7 × 0.33 m 3 and has a weight of 70 kg. This design can be implemented as a cryogenic unit to be used in space, as well as a room-temperature unit working at the focus of suborbital and ground-based mm-wave telescopes. The first in-flight test of the instrument is with the OLIMPO experiment on a stratospheric balloon; a larger implementation is being prepared for the Sardinia radio telescope.