A newly developed fiber Bragg grating (FBG) fabrication method is demonstrated. By combining a stable continuous-wave UV laser, a high precision electro-optical UV modulator, a compact and stable holographic setup, and a subnanometer precision air-bearing translation stage, the setup allows both apodization and phase of the FBGs to be continuously changed at each grating line. During the writing process, a fiber is moved constantly by the high-precision air-bearing stage, while the UV laser beam is switched on and off by a customized pulse train with nanosecond timing precision and forms a stable interference pattern on the fiber. The error of this system mainly results from the control signal’s timing jitter, which is normally lower than 0.1%. Theoretical analysis and experimental results for gratings with various structures are demonstrated and discussed. They show good agreement, demonstrating that the fabrication method is capable of fabricating gratings with arbitrary apodization and phase design. © 2004 Society of Photo-Optical Instrumentation Engineers.