A process for preparing the benzotriazole as photostabilizer includes such steps as dissolving 2-nitro-2'-hydroxy-5'-methyl azobenzene and 2-nitro-2'-hydroxy-3'- tert-butyl-5'-methyl propionate azobenzene in the mixture of alcohol and alkali solution, adding hydrazine hydrate, heating, reflux reaction, using hydrochloric acid to neutralize the reaction liquid, depositing, filtering, water washing, drying to obtain an intermediate, dissolving it in the mixture of alcohol and alkali, adding sodium dithionate, stirring while reacting, adding ice water, neutralizing, filtering, drying, and recrystallizing in alcohol or isopropanol.