Swirling jets and vortices can both be unstable to the centrifugal instability but with a different wavenumber selection: the most unstable perturbations for swirling jets in inviscid fluids have an infinite azimuthal wavenumber, whereas, for vortices, they are axisymmetric but with an infinite axial wavenumber. Accordingly, sufficient condition for instability in inviscid fluids have been derived asymptotically in the limits of large azimuthal wavenumber m for swirling jets (Leibovich and Stewartson, J. Fluid Mech., vol. 126, 1983, pp. 335-356) and large dimensionless axial wavenumber k for vortices (Billant and Gallaire, J. Fluid Mech., vol. 542, 2005, pp. 365-379). In this paper, we derive a unified criterion valid whatever the magnitude of the axial flow by performing an asymptotic analysis for large total wavenumber √ k 2 + m 2 . The new criterion recovers the criterion of Billant and Gallaire when the axial flow is small and the Leibovich and Stewartson criterion when the axial flow is finite and its profile sufficiently different from the angular velocity profile. When the latter condition is not satisfied, it is shown that the accuracy of the Leibovich and Stewartson asymptotics is strongly reduced. The unified criterion is validated by comparisons with numerical stability analyses of various classes of swirling jet profiles. In the case of the Batchelor vortex, it provides accurate predictions over a wider range of axial wavenumbers than the Leibovich-Stewartson criterion. The criterion shows also that a whole range of azimuthal wavenumbers are destabilized as soon as a small axial velocity component is present in a centrifugally unstable vortex.