We calculate the unpolarized transverse momentum dependent fragmentation function at next-to-next-to-leading order, evaluating separately the transverse momentum dependent (TMD) soft factor and the TMD collinear correlator. For the first time, the cancellation of spurious rapidity divergences in a properly defined individual TMD beyond the first nontrivial order is shown. This represents a strong check of the given TMD definition. We extract the matching coefficient necessary to perform the transverse momentum resummation at next-to-next-to-next-to-leading-logarithmic accuracy. The universal character of the soft function, which enters the definition of all (un)polarized TMD distribution/fragmentation functions, facilitates the future calculation of all the other TMDs and their coefficients at next-to-next-to-leading order, pushing forward the accuracy of theoretical predictions for the current and next generation of high energy colliders.