A displacement sensor was constructed to monitor the motion of a piezoelectric Doppler velocity transducer in a gravitational redshift experiment with 67Zn Mössbauer resonance. The sensor uses a dc superconducting quantum interference device (SQUID) to detect small displacements of a permanent magnet. To meet the stringent requirements of the redshift experiment, the magnetic flux gradient and the pickup coil of the sensor are designed in such a way that the SQUID flux noise of 7 × 10−6 Φ0/√Hz corresponds to a displacement resolution of 6 × 10−14 m/√Hz. However, resolution up to 3 × 10−15 m/√Hz in the frequency band of 20–20 000 Hz is demonstrated. The linearity of the displacement sensor and the piezoelectric transducer are considered in detail and the resulting uncertainties associated with the Doppler modulation in the Mössbauer experiment are evaluated.