In this paper, rigorous simulation and aerial imaging simulation were carried out for phase defects of EUV mask to obtain typical images of different types of phase defects. On this basis, a template matching algorithm based on defocus imaging was proposed to detect EUV mask phase defect and achieve a high detection rate of defects. It has good guidance and application value for the defect detection of extreme ultraviolet mask blank.