Diffraction gratings have been holographically fabricated on the "flat" surface of pre-etched D-fibers. The D-fibers are single mode with cutoff wavelengths of 633, 820, and 1300 nm. The gratings range in periodicity from less than 0.9 to 1.4 μm. Maximum total free-space coupling efficiencies of up to 82% are reported with a grating periodicity of 1.4 μm over a length of about 5 to 7 mm. Guided-mode to free-space coupling is enhanced by reducing the core-to-flat distance of the D-fiber. This distance is controlled by chemically etching the fiber by means of an in situ monitored etching technique. The different etch rates between the cladding and the silica cause a recessed contour in the cladding centered over the core. This recess causes difficulties when patterning submicron photoresist gratings over the core. Photoresist gratings are fabricated holographically by means of a Lloyd's mirror arrangement. Masked etching with hydrofluoric acid writes the gratings into the cladding structure of the fiber. Incorporating diffraction gratings into optical fibers miniaturizes integrated diffraction grating devices and eliminates the need to remove a signal from its fiber environment for processing.