The Fourier transform (FT), a cornerstone of optical processing, enables rapid evaluation of fundamental mathematical operations, such as derivatives and integrals. Conventionally, a converging lens performs an optical FT in free space when light passes through it. The speed of the transformation is limited by the thickness and the focal length of the lens. By using the wave nature of surface plasmon polaritons (SPPs), here we demonstrate that the FT can be implemented in a planar configuration with a minimal propagation distance of around 10 μm, resulting in an increase of speed by four to five orders of magnitude. The photonic FT was tested by synthesizing intricate SPP waves with their Fourier components. The reduced dimensionality in the minuscule device allows the future development of an ultrafast on-chip photonic information processing platform for large-scale optical computing.