High-precision cosmology requires the analysis of large-scale surveys in 3D spherical coordinates, i.e. spherical Fourier-Bessel decomposition. Current methods are insufficient for future data-sets from wide-field cosmology surveys. The aim of this paper is to present a public code for fast spherical Fourier-Bessel decomposition that can be applied to cosmological data or 3D data in spherical coordinates in other scientific fields. We present an equivalent formulation of the spherical Fourier-Bessel decomposition that separates radial and tangential calculations. We propose the use of the existing pixelisation scheme HEALPix for a rapid calculation of the tangential modes. 3DEX (3D EXpansions) is a public code for fast spherical Fourier-Bessel decomposition of 3D all-sky surveys that takes advantage of HEALPix for the calculation of tangential modes. We perform tests on very large simulations and we compare the precision and computation time of our method with an optimised implementation of the spherical Fourier-Bessel original formulation. For surveys with millions of galaxies, computation time is reduced by a factor 4-12 depending on the desired scales and accuracy. The formulation is also suitable for pre-calculations and external storage of the spherical harmonics, which allows for additional speed improvements. The 3DEX code can accommodate data with masked regions of missing data. 3DEX can also be used in other disciplines, where 3D data are to be analysed in spherical coordinates. The code and documentation can be downloaded at http://ixkael.com/blog/3dex.