An accurate nonlinearity compensation technique for voltage source inverter (VSI) inverters is presented in this paper. Because of the nonlinearity introduced by the dead time, turn-on/off delay, snubber circuit and voltage drop across power devices, the output voltage of VSI inverters is distorted seriously in the low output voltage region. This distortion influences the output torque of IM motors for constant V/f drives. The nonlinearity of the inverter also causes 5th and 7th harmonic distortion in the line current when the distributed energy system operates in the grid-connected mode, i.e., when the distributed energy system is parallel to a large power system through the VSI inverter. Therefore, the exact compensation of this nonlinearity in the VSI inverter over the entire range of output voltage is desirable. In this paper, the nonlinearity of VSI inverter output voltage and the harmonic distortion in the line current are analyzed based on an open-loop system and a L-R load. By minimizing the harmonic component of the current in a d-axis and q-axis synchronous rotating reference frame, the exact compensation factor was obtained. Simulations and experimental results in the low frequency and low output voltage region are presented.