Accurately measuring mechanical displacements is essential for a vast portion of current technologies. Several optical techniques accomplish this task, allowing for non-contact sensing even below the diffraction limit. Here we introduce an optical encoding technique, dubbed linear photonic gears, that enables ultra-sensitive measurements of transverse displacements by mapping these into polarization rotations of a laser beam. In ordinary ambient conditions, we measure the relative shift between two objects with a resolution of 400 pm. We argue that a resolution of 50 pm should be achievable with existing state-of-the-art technologies. Our single-optical-path scheme is intrinsically stable and it could be implemented as a compact sensor, using integrated optics. We anticipate it may have a strong impact on both research and industry.