Superconductivity in cuprates peaks in the doping regime between a metal at high p and an insulator at low p. Understanding how the material evolves from metal to insulator is a fundamental and open question. Early studies in high magnetic fields revealed that below some critical doping an insulator-like upturn appears in the resistivity of cuprates at low temperature, but its origin has remained a puzzle. Here we propose that this metal-to-insulator crossover is due to a drop in carrier density n associated with the onset of the pseudogap phase at a critical doping p*. We use high-field resistivity measurements on LSCO to show that the upturns are quantitatively consistent with a drop from n=1+p above p* to n=p below p*, in agreement with high-field Hall data in YBCO. We demonstrate how previously reported upturns in the resistivity of LSCO, YBCO and Nd-LSCO are explained by the same universal mechanism: a drop in carrier density by 1.0 hole per Cu atom.