We report on the fabrication by electron-beam lithography of Bragg gratings, which serve as wavelength-selective elements of a Mach–Zehnder-type add-drop filter. To meet telecommunication network requirements, the gratings must have about 20 000 lines, corresponding to a length on the order of 10 mm. Furthermore, the coupling strength of the gratings has to be varied according to a bell-shaped taper function to suppress unwanted side lobes in the gratings’ reflection spectra. We have realised coupling coefficient variation at constant etch depth by changing the duty cycle along the grating. The employed pattern reversal process provides good line-width control of the grating ridges down to 50 nm, and good coverage by the subsequent PECVD overgrowth. Optical measurements are presented that demonstrate the excellent performance of the grating couplers.