The present study investigates the modal stability of the steady incompressible flow inside a toroidal pipe for values of the curvature $\delta$ (ratio between pipe and torus radii) approaching zero, i.e. the limit of a straight pipe. The global neutral stability curve for $10^{-7} \leq \delta \leq ~10^{-2}$ is traced using a continuation algorithm. Two different families of unstable eigenmodes are identified. For curvatures below $1.5 \times 10^{-6}$ , the critical Reynolds number ${{Re}}_{cr}$ is proportional to $\delta ^{-1/2}$ . Hence, the critical Dean number is constant, ${{De}}_{cr} = 2\,{{Re}}_{cr}\,\sqrt {\delta } \approx 113$ . This behaviour confirms that the Hagen–Poiseuille flow is stable to infinitesimal perturbations for any Reynolds number and suggests that a continuous transition from the curved to the straight pipe takes place as far as it regards the stability properties. For low values of the curvature, an approximate self-similar solution for the steady base flow can be obtained at a fixed Dean number. Exploiting the proposed semi-analytic scaling in the stability analysis provides satisfactory results.