At the interface between complex insulating oxides, novel phases with interesting properties may occur, such as the metallic state reported in the LaAlO3/SrTiO3 system 1. Although this state has been predicted 2 and reported3,4 to be confined at the interface, some studies indicate a much broader spatial extension5, thereby questioning its origin. Here, we provide for the first time a direct determination of the carrier density profile of this system through resistance profile mappings collected in cross-section LaAlO3/SrTiO3 samples with a conducting-tip atomic force microscope (CT-AFM). We find that, depending on specific growth protocols, the spatial extension of the high-mobility electron gas can be varied from hundreds of micrometres into SrTiO3 to a few nanometres next to the LaAlO3/SrTiO3 interface. Our results emphasize the potential of CT-AFM as a novel tool to characterize complex oxide interfaces and provide us with a definitive and conclusive way to reconcile the body of experimental data in this system.