Light detection and ranging (LiDAR) technology is an active remote-sensing system used in autonomous vehicles, machine vision and augmented reality. Improvements in the speed and signal-to-noise ratio of photodetectors are needed to meet these demanding ranging applications. Silicon electronics have been the principal option for LiDAR photodetectors in the range of 850–950 nm. However, its indirect bandgap leads to a low absorption coefficient in the near-infrared region, as well as a consequent trade-off between speed and efficiency. Here we report solution-processed lead–tin binary perovskite photodetectors that have an external quantum efficiency of 85% at 850 nm, dark current below 10–8 A cm–2 and response time faster than 100 ps. The devices are fabricated using self-limiting and self-reduced tin precursors that enable perovskite crystallization at the desired stoichiometry and prevent the formation of interfacial defects with the hole transport layer. The approach removes oxygen from the solution, converts Sn4+ to Sn2+ through comproportionation, and leaves neither metallic tin nor SnOx residues. To illustrate the potential of these solution-processed perovskite photodetectors in LiDAR, we show that they can resolve sub-millimetre distances with a typical 50 µm standard deviation.