The reflective spectrum of fiber Bragg gratings (FBGs) might be regarded as the spatial Fourier transform (FT) of the refractive index modulation when the reflection is low. Therefore, the normalized amplitude and the phase which are obtained from the inverse FT of the expected reflection shape are the significant factors for designing the intensity and phase modulation of the index change, respectively. By carefully incorporating and designing the intensity and the phase modulations, we obtain FBGs with arbitrary reflective spectra including cosine/sine, triangle, sawtooth, trapezia and upside-down triangle shapes. Simulation results based on the piecewise uniform method further confirm the proposed method. Such FBGs can easily find their applications in signal generation, parameter demodulation, and so on.