In this paper, we discuss the importance of spectral tailoring of fiber Bragg gratings (FBG) for applications ranging from optical sensors to optical communication, and demonstrate a simple technique for fabricating FBGs with a desired spectrum. The underlying principle that is exploited in our work is the dependence of the FBG spectrum on the average index profile along the grating. In the first part of the paper, we simulate the grating spectrum for various refractive index profiles including the raised cosine profile and the Gaussian profile. In the later part, we discuss the fabrication of such gratings using a scanning beam technique. We demonstrate the control of the grating spectrum and the reflectivity through the scanning beam fabrication. © 2015, The Optical Society of India.