Here, we proposed an ingenious grid pattern design method called pattern randomization to obtain metallic meshes with uniform stray light. The periodicity of a grid is weakened by the pattern randomization. By comparing the diffraction patterns of one-dimensional periodic grid, one-dimensional aperiodic grid and concentric rings structure, we found that the "radial homogenization" and "angular homogenization" can uniform the high-order diffracted energy. The pattern randomization is proposed to achieve the "radial homogenization" and "angular homogenization" two-dimensional grid while ensuring connectivity. For collimated incident beam, the metal grid with a randomness (90%, 90%) obtained by pattern randomization method generates uniform stray light, while it maintains high visible light transmittance and high electromagnetic shielding efficiency (SE). The simulated results are experimentally verified that the high-order diffraction spots can be effectively suppressed. The coefficient Cv is reduced from 1078.14% to 164.65%. Meanwhile, the randomness of the designed grid structure hardly affects the visible light transmittance and shielding efficiency. The metallic mesh with a shielding efficiency about 17.3 dB in the Ku-band, a relative transmittance higher than 94% in the visible light band and an ultra-uniform diffraction pattern is obtained.