In recent years there has been a substantial increase in the demand for controllable reactive power sources which can compensate for large lagging loads. These requirements involve precise and continuous reactive power control with fast response time and avoidance of harmonic line current generation. Solid state Var compensators using forced commutated converters have been developed and are being used for this purpose. Active power filtering (APF) can provide VAr compensation by injecting equal but opposite distortion at selected points in a network. The objective of this project is to design an Active Power Filter (APF) using Voltage Source Inverter (VSI) to achieve reactive power compensation. It is achieved by forcing the inverter line current to follow a reactive sinusoidal reference at a constant switching frequency. The current reference generator has been designed for both lagging and leading reactive power conditions. The reactive power requirements of a bridge rectifier connected load are estimated using the above current reference generator. Using this, an APF is designed to compensate the reactive power requirements of the above load.