By using the quadratic spatial filtering (QSF) operation of interferograms, we propose a fast and accurate phase retrieval algorithm in 2-step phase-shifting interferometry (PSI), in which both the interference signal separation and blind phase shift estimation can be realized. Compared with the existed 2-step PSI algorithms, the proposed QSF algorithm reveals two advantages: First, when the background intensity is not accurately estimated, which is a serious problem in 2-step PSI, the distortion of the retrieved phase can be released. Second, there is no requirement about the fringe density of interference pattern, reflecting the phase shift estimation can be realized even if the fringes density is sparse. The former is a valuable solution to reduce most significant errors in 2-step PSI, and the latter makes the accuracy robust against different fringe patterns. Both the simulation and experimental results demonstrate the excellent performance of the proposed QSF algorithm.