A wavelength switchable all-fiber comb filter with flat-top spectral response based on a double-loop Mach-Zehnder (M-Z) interferometer is proposed and demonstrated. The proposed flat-top filter consists of a rotatable polarizer and a double-loop M-Z interferometer composed of two fiber couplers with a polarization controller (PC) in the first loop. In the theoretical analysis, when the second coupler of the M-Z interferometer is a non-3dB one, with proper settings of the polarization state of the input light and the PC, the wavelength switchable comb filter with flat-top passband can be obtained. Theoretical prediction was verified by experimental demonstration. The measured 1 dB bandwidth was 0.51 nm with a channel spacing of 0.98 nm, indicating that the flat-top passband of 1 dB bandwidth extends to about 50% of the comb spacing.