Photons are critical to quantum technologies because they can be used for virtually all quantum information tasks, for example, in quantum metrology, as the information carrier in photonic quantum computation, as a mediator in hybrid systems, and to establish long-distance networks. The physical characteristics of photons in these applications differ drastically; spectral bandwidths span 12 orders of magnitude from 50 THz (ref. 6) for quantum-optical coherence tomography to 50 Hz for certain quantum memories. Combining these technologies requires coherent interfaces that reversibly map centre frequencies and bandwidths of photons to avoid excessive loss. Here, we demonstrate bandwidth compression of single photons by a factor of 40 as well as tunability over a range 70 times that bandwidth via sum-frequency generation with chirped laser pulses. This constitutes a time-to-frequency interface for light capable of converting time-bin to colour entanglement, and enables ultrafast timing measurements. It is a step towards arbitrary waveform generation for single and entangled photons.