Abstract We address the problem of shaping the intensity distribution of a highly directional partially coherent field, such as an excimer laser beam, by means of diffractive optics. Our theoretical analysis is based on modelling the multi-transverse-mode laser beam as a Gaussian Schell-model beam. It is shown numerically that a periodic element, which is unsuitable for the shaping of a coherent laser beam, works well with an excimer laser beam because of its partial spatial coherence. The conversion of an approximately Gaussian excimer laser beam into a flat-top beam in the Fourier plane of a lens is demonstrated with a diffractive beam shaper fabricated as a multilevel profile in SiOl by electron-beam lithography and proportional reactive-ion etching.