A class D amplifier including a PWM circuit, a buffer amplifying circuit, a low-pass filter, and two current sources is provided. The PWM circuit transfers an analog signal into a PWM signal. The buffer amplifying circuit amplifies the PWM signal and generates an amplified signal. The low-pass filter will filter high frequency components out from the amplified signal and then transmit the filtered signal to a loading of the class D amplifier. The two current sources provide currents flowing into and out from a feedback node in the PWM circuit, respectively. The charging and discharging provided by the two current sources can generate a triangular signal for the PWM circuit.