We calculate the large deviation function of the end-to-end distance and the corresponding extension-versus-force relation for (isotropic) random walks, on and off-lattice, with and without persistence, and in any spatial dimension. For off-lattice random walks with persistence, the large deviation function undergoes a first order phase transition in dimension $d\geq 6$. This transition is both physically and mathematically similar to the Bose-Einstein condensation, with the condensed phase corresponding to a macroscopic fraction of the random walk oriented along the end-to-end distance. In the corresponding force-versus-extension relation, the extension becomes independent of the force beyond a critical value. The transition is anticipated in dimensions $d=4$ and $d=5$, where full extension is reached at a finite value of the applied stretching force. Full analytic details are revealed in the run-and-tumble limit. Finally, on-lattice random walks with persistence display a softening phase in dimension $d=3$ and above, preceding the usual stiffening appearing beyond a critical value of the force.