Fibre-optic communications systems have traditionally carried data using binary (on−off) encoding of the light amplitude. However, next-generation systems will use both the amplitude and phase of the optical carrier to achieve higher spectral efficiencies and thus higher overall data capacities1, 2. Although this approach requires highly complex transmitters and receivers, the increased capacity and many further practical benefits that accrue from a full knowledge of the amplitude and phase of the optical field3 more than outweigh this additional hardware complexity and can greatly simplify optical network design. However, use of the complex optical field gives rise to a new dominant limitation to system performance—nonlinear phase noise4, 5. Developing a device to remove this noise is therefore of great technical importance. Here, we report the development of the first practical (‘black-box’) all-optical regenerator capable of removing both phase and amplitude noise from binary phase-encoded optical communications signals.