The paper analyzes the performance and implementation of a Unified Power Quality Conditioner (UPQC) to improve power quality by mitigating voltage and current distortions caused by nonlinear loads. It highlights the functionality of series and shunt active power filters in reducing harmonic distortions, achieving sinusoidal voltage and current, and optimizing reactive power management. The effectiveness of the UPQC is demonstrated through simulations using MATLAB/Simulink, which confirm a significant reduction in total harmonic distortion.