  We present the three-loop result for the soft anomalous dimension governing
long-distance singularities of multi-leg gauge-theory scattering amplitudes of
massless partons. We compute all contributing webs involving semi-infinite
Wilson lines at three loops and obtain the complete three-loop correction to
the dipole formula. We find that non-dipole corrections appear already for
three coloured partons, where the correction is a constant without kinematic
dependence. Kinematic dependence appears only through conformally-invariant
cross ratios for four coloured partons or more, and the result can be expressed
in terms of single-valued harmonic polylogarithms of weight five. While the
non-dipole three-loop term does not vanish in two-particle collinear limits,
its contribution to the splitting amplitude anomalous dimension reduces to a
constant, and it only depends on the colour charges of the collinear pair,
thereby preserving strict collinear factorization properties. Finally we verify
that our result is consistent with expectations from the Regge limit.
