Optical surface gratings for surface emitting semiconductor lasers require extremely smooth functional surfaces, vertical step edges, a low sidewall roughness, and a high accuracy over a large area. We report on the fabrication of binary patterns with a period of 1300 nm in (100) GaAs and A1GaAs (grown by MOVPE on a (100) GaAs wafer) by electron beam lithography and different dry etching techniques, such as IBE, CAIBE and CARIBE. In order to improve the selectivity of the etch technique as well as the sidewall roughness three different etching mask techniques were applied. For grating depths of about 150 nm the best results with respect to the geometrical grating characteristics have been achieved by using the e-beam exposed and developed PMMA as a direct etching mask. Comparing the different etching techniques, CAIBE on GaAs with chlorine shows the best etching behavior (selectivity, step angle, roughness). A step edge angle of 900 was achieved at an energy of 200 eV (Ar) and a chlorine flow of 1.25 sccm. Optical diffraction measurements reveal a high efficiency for the gratings with vertical sidewalls and a line/space ratio of approximately 1.