The commonly used phase processing techniques include coherence method, zero-crossing comparison method and FFT method. Due to the influence of noise, amplitude modulation and frequency modulation, these phase processing methods are easy to cause errors, thus affecting the measurement accuracy. In this paper, a phase processor based on all-phase fast Fourier transform is developed. The principle of the phase processing algorithm is analyzed, and the implementation process of the algorithm on FPGA is described. The effectiveness of the method is tested under different conditions. The experimental results show that the standard deviation of phase processing is 0.387° when the signal is sampled simultaneously under 90% AM modulation. When asynchronous sampling and 50% FM, the phase processing error is 0.371°. This phase processer has been used to the terahertz interferometer of the HL-2M device, the phase change of the output signal of the interferometer can be accurately processed when the plasma density changes dramatically, and the loss of phase processing information can be effectively avoided in the plasma diagnosis process. Based on the technical research proposed in this paper, a more accurate phase processing reference scheme is provided for plasma diagnosis of interferometer.