Since the traditional Fourier algorithm is asynchronous sampling in practical engineering applications, there are barrier effects and spectrum leakage, resulting in low harmonic phase detection accuracy. Based on this problem, an improved all-phase algorithm based on hybrid window is proposed. By analyzing the characteristics of the hybrid convolution window, a second-order hybrid convolution window of the hanning window and four fifth-order nuttall is proposed, which is used to preprocess the all-phase algorithm and analyze the all-phase Fourier transform from the actual situation. An improved all-phase Fourier algorithm based on hybrid convolution window is proposed, which is used to detect the harmonic phase. Finally, it is compared with the traditional windowed interpolation algorithm under the influence of white noise and frequency fluctuation. The simulation results show that the optimization algorithm can effectively improve the accuracy of harmonic phase detection and has strong ability to resist white noise and frequency fluctuation.