High precision cosmology requires analysis of large scale surveys in 3D spherical coordinates, i.e. Fourier-Bessel decomposition. Current methods are insufficient for future data-sets from wide-field cosmology surveys. 3DEX (3D EXpansions) is a public code for fast Fourier-Bessel decomposition of 3D all-sky surveys which takes advantage of HEALPix for the calculation of tangential modes. 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 further speed improvements. The 3DEX code can accommodate data with masked regions of missing data. It can be applied not only to cosmological data, but also to 3D data in spherical coordinates in other scientific fields.