Because diffractive optical element can shape Gaussian beam, it is attached great importance. The conventional design methods such as G-S algorithm tend to need a large amount of calculation and a long time, while Hankel transformation can increase calculation speed and save time. We successfully designed a binary refractive and diffractive optical element applying Hankel transformation into G-S algorithm. When the diffractive optical element was placed at the waist of the laser beam with the wavelength of 775 nm and the waist diameter of 6 cm, a uniform spot could be gotten at the detector plane 35 cm behind it. Its radius was 200 μm and root-mean-square error was smaller than 0.021. The calculation time was only 20.05 s with PC, saving much time during the process of optimization, in which hundreds of calculation were needed. We fabricated the refractive and diffractive optical element by ion beam etching, and tested it in lab. The experiment results agreed well with the caculation. This kind of element not only can get good spot, but also is suitable of integration with laser.