A diazotization method was used to synthesize new azo compounds, to which phenol was subsequently added to diazonium salt solution in basic medium at temperatures ranging from 0 to 5 °C and compounds were characterized by FT-IR, 1H-NMR, and 13C-NMR spectroscopy. The potential of the compounds as acid-base indicators was tested by determining their ionization and protonation constants at different pH levels (1 to 14) using a DMSO solution of the synthesized compounds. UV-Vis spectra shown as maximum wavelength (380-390 nm) observed at pH 1-7 occurs, indicating the cationic formula (protonated form of compound H2 and H4), another peak (470-530 nm) appears at pH 8-13, indicating the ionic formula (deprotonated form of compound H2 and H4), where for compound H5 observed at 560 nm at pH 1-7. Another peak appears 505 nm at pH 8-13 attributable to absorption the ionic formula (deprotonated form of compounds H5). Molecules H2, H4, and H5 showed distinct color changes when shifted to acidic and basic conditions. Furthermore, these compounds showed exceptional accuracy in drawing conclusions about the phenomenon.