This paper presents the design, fabrication and characterization of a CMOS-compatible thermopile infrared (IR) detector with self-test function based on XeF2 front-side dry etching. In order to achieve better performance, a heavily doped N/P-polysilicon is utilized to form thermocouples, and front-side isotropic etching is adopted to release and thermal isolation. At the same time, a platinum heater on the absorption layer is designed to serve as a heat source to realize the self-test function of the thermopile IR detector. IR radiation sensing shows that the detector achieves relatively high responsivity of 160.03 V W−1 and detectivity of and a extremely short response time of 2.5 ms in air at room temperature. In addition, a self-test measurement is conducted and validated by applying a voltage to the heater. Compared with traditional methods for detecting thermopile performance, this method has obvious convenience and simplicity, which provides an effective way for performance monitoring of thermal-based devices.