Diffractive optical elements (DOEs) are key components in the miniaturization of optical systems because of their planarity and extreme thinness. We demonstrate the fabrication of DOEs by use of gray-scale photolithography with a high-energy-beam sensitive glass photomask. We obtained DOE lenses with continuous phase profiles as small as 800 microm in diameter and 5.9 microm in the outermost grating pitch by selecting a suitable optical density for each height level and optimizing the process variables. Microlenses patterned with eight levels and replicated by UV embossing with the polymer master mold showed a diffraction efficiency of 81.5%, which was sufficiently high for the devices to be used as optical pickups. The effects of deviations in diffraction efficiency between the DOE height and profile design were analyzed.