In this paper, primary side regulation (PSR) technology for single-stage flyback converter in discontinuous conduction mode (DCM) and continuous conduction mode (CCM) operations is presented. The output voltage and current are estimated by sensing the auxiliary winding voltage and the power switch current without the secondary-side output feedback circuits. In this paper, the algorithm used for PSR allows the magnetizing current to be operated in DCM and CCM. Therefore, the PSR flyback converter is suitable for wide input voltage range and wide output power range applications. Finally, the control algorithm is implemented with the digital control to achieve high power factor with 90-264 Vrms universal input voltage and 24 V/96 W output voltage and rated output power. Experimental results show the power factor is higher than 0.93 and the output voltage control accuracy and output current accuracy are within 6.25% and 8%, respectively under the universal input voltage range conditions. The highest system efficiency is 88.3%.