Leakage current is the most important parameter in measuring electrical safety performance. A leakage current measuring system which meets multiple IEC standards is designed based on TMS320F2812 in the paper. Pretreatment amplifying circuit adopts high precision linear optocoupler HCNR201 and broadband amplifier HA7-5127-5. AD converter is the embeded 12-bit A/D in the DSP. Magnification times of the broadband is amended in piecewise linear approximation by software. This system is suitable for DC~1MHz leakage current measurement, and the test precision achieves ±2%.