Strontium titanate exhibits two phase transitions at 5 GPa and 14 GPa. We use X-ray absorption Ti K pre-edge structure as a probe of the local atomic structure of SrTi03 under pressure. The pre-edge is characterized by four main features labeled A, B, Ci and C2. Above 5 GPa, the intensity of peak B is decreased while that of the double feature C1-C2 is increased. By increasing the pressure above 14 GPa, peak A shifts towards lower energy and of peak Ci towards higher energy. While the first phase transformation is known to be a transition from the cubic phase to a tetragonal one, the second phase transformation leads to a crystal structure not yet identified. To analyze these spectral modifications, full-potential first principles simulations of Ti K pre-edge are performed. The calculations provide a good agreement with experiments and permits the identification of the four features in terms of orbital hybridization. Trial crystal structures are proposed in order to account for the pre-edge modifications observed under pressure.