On-chip spectrometers with high compactness and portability enable new applications in scientific research and industrial development. Fourier transform (FT) spectrometers have the potential to realize a high signal-to-noise ratio. Here we propose and demonstrate a generalized design for high-performance on-chip FT spectrometers. The spectrometer is based on the dynamic in-plane reconfiguration of a waveguide coupler enabled by an integrated comb-drive actuator array. The electrostatic actuation intrinsically features ultra-low power consumption. The coupling gap is crucial to the spectral resolution. The in-plane reconfiguration surmounts the lithography accuracy limitation of the coupling gap, boosting the resolution to 0.2 nm for dual spectral spikes over a large bandwidth of 100 nm (1.5–1.6 μm) within a compact footprint of 75 μm×1000 μm. Meanwhile, the in-plane tuning range can be large enough for arbitrary wavelengths to ensure the effectiveness of spectrum reconstruction. As a result, the proposed spectrometer can be easily transplanted to other operation bands by simply scaling the structural parameters. As a proof-of-concept, a mid-infrared spectrometer is further demonstrated with a dual-spike reconstruction resolution of 1.5 nm and a bandwidth of 300 nm (4–4.3 μm).