This work presents the O K- and Ti L3,2-edge x-ray absorption near-edge structure (XANES) spectra of PbxSr1-xTiO3 (PxSTO) and BaxSr1-xTiO3 (BxSTO) compounds with various Pb and Ba concentrations. The result provides direct evidence that the Pb–O bonding strongly affects O 2p–Ti 3d hybridization in the TiO6 octahedron of PxSTO. In contrast, the Ba–O bonding does not substantially affect O 2p–Ti 3d hybridization in BxSTO. The Ti L3-edge XANES spectra show the splitting of the eg band for PxSTO with x≳0.5, which provides an evidence of Pb-induced tetragonal distortion in the TiO6 octahedron. In contrast, eg band splitting is absent in BxSTO.