Optical transmission systems with terabit per second (Tbit s−1) single-channel line rates no longer seem to be too far-fetched. New services such as cloud computing, three-dimensional high-definition television and virtual-reality applications require unprecedented optical channel bandwidths. These high-capacity optical channels, however, are fed from lower-bitrate signals. The question then is whether the lower-bitrate tributary information can viably, energy-efficiently and effortlessly be encoded to and extracted from terabit per second data streams. We demonstrate an optical fast Fourier transform scheme that provides the necessary computing power to encode lower-bitrate tributaries into 10.8 and 26.0 Tbit s−1 line-rate orthogonal frequency-division multiplexing (OFDM) data streams and to decode them from fibre-transmitted OFDM data streams. Experiments show the feasibility and ease of handling terabit per second data with low energy consumption. To the best of our knowledge, this is the largest line rate ever encoded onto a single light source.