Relativistic heavy-ion collisions can produce extremely strong magnetic fields in the collision regions.The spatial variation features of the magnetic fields are analyzed in detail for non-central Pb–Pb collisions at LHC at√s NN = 900, 2760 and 7000 Ge V and Au–Au collisions at RHIC at√s NN=62.4, 130 and 200 Ge V. The dependencies of magnetic field on proper time, collision energies and impact parameters are investigated in this paper. It is shown that an enormous and highly inhomogeneous spatial distribution magnetic field can indeed be cr...