We describe the use of synchrotron X-ray absorption spectroscopy (XAS) and X-ray diffraction (XRD) techniques to probe details of intercalation/deintercalation processes in electrode materials for Li-ion and Na-ion batteries. Both in situ and ex situ experiments are used to understand structural behavior relevant to the operation of devices