We show that if a group automorphism of a Cremona group of arbitrary rank is also a homeomorphism with respect to either the Zariski or the Euclidean topology, then it is inner up to a field automorphism of the base-field. Moreover, we show that a similar result holds if we consider groups of polynomial automorphisms of affine spaces instead of Cremona groups.