Linear optics underpins tests of fundamental quantum mechanics and computer science, as well as quantum technologies. Here we experimentally demonstrate the longstanding goal of a single reprogrammable optical circuit that is sufficient to implement all possible linear optical protocols up to the size of that circuit. Our six-mode universal system consists of a cascade of 15 MachZehnder interferometers with 30 thermo-optic phase shifters integrated into a single photonic chip that is electrically and optically interfaced for arbitrary setting of all phase shifters, input of up to six photons and their measurement with a 12 single-photon detector system. We programmed this system to implement heralded quantum logic and entangling gates, boson sampling with verification tests, and six-dimensional complex Hadamards. We implemented 100 Haar random unitaries with average fidelity 0.999 ± 0.001. Our system is capable of switching between these and any other linear optical protocol in seconds. These results point the way to applications across fundamental science and quantum technologies.Photonics has been crucial in establishing the foundations of quantum mechanics [1], and more recently has pushed the vanguard of efforts in understanding new non-classical computational possibilities. Typical protocols involve nonlinear operations, such as the generation of quantum states of light through optical frequency conversion [2,3], or measurement-induced nonlinearities for quantum logic gates [4], together with linear operations between optical modes to implement core processing functions [5]. Encoding qubits in the polarisation of photons has been particularly appealing for the ability to implement arbitrary linear operations on the two polarisation modes using a series of wave plates [6]. For path encoding the same operations can be mapped to a sequence of beamsplitters and phase shifters. In fact, since any linear optical (LO) circuit is described by a unitary operator, and a specific array of basic two-mode operations is mathematically sufficient to implement any unitary operator on optical modes [7], it is theoretically possible to construct a single device with sufficient versatility to implement any possible LO operation up to the specified number of modes.Here we report the realisation of this longstanding goal with a six-mode device that is completely reprogrammable and universal for LO. We demonstrate the versatility of this universal LO processor (LPU) by applying it to several quantum information protocols, including tasks that were previously not possible. We im- * anthony.laing@bristol.ac.uk plement heralded quantum logic gates at the heart of the circuit model of LO quantum computing [4] and new heralded entangling gates that underpin the measurementbased model of LO quantum computing [8][9][10], both of which are the first of their kind in integrated photonics. We perform 100 different boson sampling [11][12][13][14][15] experiments and simultaneously realise new verification protocols. Finally, we use multi-p...