The reflection spectra of conventional fiber Bragg gratings (FBGs) with uniform index modulation profiles typically have strong sidelobes, which hamper the performance of FBG-based optical filters, fiber lasers, and sensors. Here, we propose and demonstrate a femtosecond laser line-by-line (LbL) scanning technique for fabricating apodized FBGs with suppressed sidelobes. This approach can flexibly achieve various apodized modulation profiles via precise control over the length and/or transverse position of each laser-inscribed index modification track. We theoretically and experimentally studied the influences of the apodization function on the side-mode suppression ratio (SMSR) in the fabricated apodized FBG, and the results show that a maximum SMSR of 20.6 dB was achieved in a Gaussian-apodized FBG. Subsequently, we used this method to fabricate various apodized FBGs, and the SMSRs in these FBGs were reduced effectively. Specifically, a dense-wavelength-division-multiplexed Gaussian-apodized FBG array with a wavelength interval of 1.50 nm was successfully fabricated, and the SMSR in such an array is 14 dB. Moreover, a Gaussian-apodized phase-shifted FBG and chirped FBG were also demonstrated with a high SMSR of 14 and 16 dB, respectively. Therefore, such an apodization method based on a modified femtosecond laser LbL scanning technique is an effective and flexible way to fabricate various FBGs with high SMSRs, which is promising to improve the performance of optical filters, fiber lasers, and sensors.