A new technique to design an all-fiber temporal differentiator that has a large bandwidth and an arbitrary differentiation order is proposed and investigated. The proposed temporal differentiator is a special fiber Bragg grating (FBG) that is designed by controlling its magnitude and phase responses with the discrete layer peeling (DLP) method. There are three important features of this technique: 1) the temporal differentiator has an arbitrary magnitude response and a controllable bandwidth; 2) the temporal differentiator can be designed and fabricated with an arbitrary differentiation order that is realized in a single FBG; 3) the required maximum index modulation of the FBG-based differentiator is largely decreased by using a Gaussian windowing function. The use of the proposed technique to design temporal differentiators with a differentiation order up to the fourth and with a bandwidth up to 500 GHz is studied. A proof-of-concept experiment is then carried out. A first- and a second-order temporal differentiator with a bandwidth of 25 GHz are experimentally demonstrated.