An X-ray collimator used in a CT system is provided, including: a first guide rail and a second guide rail disposed in parallel with each other and a first gate assembling unit and a second gate assembling unit disposed in parallel with each other. The first gate assembling unit has one end provided with a driving mechanism and fixedly connected with the first guide rail, and another end connected with the second guide rail in a slidable connection. The second gate assembling unit has one end provided with a driving mechanism and fixedly connected with the second guide rail, and another end connected with the first guide rail in a slidable connection. And blocks for supporting and position limiting are provided on two ends of the first guide rail and two ends of the second guide rail. Sheltering effect on X-rays may be improved.