This article summarizes the developments of experimental techniques for high pressure x-ray diffraction (XRD) in diamond anvil cells (DACs) using synchrotron radiation. Basic principles and experimental methods for various diffraction geometry are described, including powder diffraction, single crystal diffraction, radial diffraction, as well as coupling with laser heating system. Resolution in d-spacing of different diffraction modes is discussed. More recent progress, such as extended application of single crystal diffraction for measurements of multigrain and electron density distribution, time-resolved diffraction with dynamic DAC and development of modulated heating techniques are briefly introduced. The current status of the high pressure beamline at BSRF (Beijing Synchrotron Radiation Facility) and some results are also presented.