Atomic transport properties of liquid iron are important for understanding the core dynamics and magnetic field generation of terrestrial planets. Depending on the sizes of planets and their thermal histories, planetary cores may be subject to quite different pressures (P) and temperatures (T). However, previous studies on the topic mainly focus on the P-T range associated with the Earth's outer core; a systematic study covering conditions from small planets to massive exoplanets is lacking. Here, we calculate the self-diffusion coefficient D and viscosity η of liquid iron via ab initio molecular dynamics from 7.0 to 25 g/cm3 and 1800 to 25 000 K. We find that D and η are intimately related and can be fitted together using a generalized free volume model. The resulting expressions are simpler than those from previous studies where D and η were treated separately. Moreover, the new expressions are in accordance with the quasi-universal atomic excess entropy (Sex) scaling law for strongly coupled liquids, with normalized diffusivity D⋆ = 0.621 exp(0.842Sex) and viscosity η⋆ = 0.171 exp(-0.843Sex). We determine D and η along two thermal profiles of great geophysical importance: the iron melting curve and the isentropic line anchored at the ambient melting point. The variations of D and η along these thermal profiles can be explained by the atomic excess entropy scaling law, demonstrating the dynamic invariance of the system under uniform time and space rescaling. Accordingly, scale invariance may serve as an underlying mechanism to unify planetary dynamos of different sizes.