Uniform beam distribution and minimum beam halo on target are often required in high intensity beam applications to prolong the target lifetime or to correctly irradiate it. In this presentation, step-like nonlinear magnets is proposed for that purpose, instead of standard multipole magnets. The results obtained for the three accelerators CSNS, C-ADS and IFMIF are discussed. The peak density as well as the beam halo of the beam footprint at target can be significantly reduced.