Deep ultraviolet (UV) photoluminescence emission spectroscopy has been employed to study the exciton localization effect in AlGaN alloys. The temperature dependence of the exciton emission peak energy in Alx Ga1-x N alloys (0≤x≤1) was measured from 10 to 800 K and fitted by the Varshni equation. Deviations of the measured data from the Varshni equation at low temperatures directly provide the exciton localization energies, ELoc. It was found that ELoc increases with x for x≤0.7, and decreases with x for x≥0.8. Our experimental results revealed that for AlGaN alloys, ELoc obtained by the above method has simple linear relations with the localized exciton thermal activation energy and the emission linewidth, thereby established three parallel methods for directly measuring the exciton localization energies in AlGaN alloys. The consequence of strong carrier and exciton localization in AlGaN alloys on the applications of nitride deep UV optoelectronic devices is also discussed.