We report on a high resolution flat crystal spectrometer designed for the Shanghai EBIT. Its energy range is from 0.5 to 10 keV. Three crystals can be installed in the vacuum chamber simultaneously, and its effective Bragg angle can be covered from 15 degrees to 75 degrees . A vacuum version charge-coupled device detector is used for detection of photons. An energy resolution under 1 eV was reached in measurements of the 4.5 keV Kalpha(1) line by using an x-ray generator with a titanium anode. The spectrometer was also tested to operate well on the Shanghai EBIT by observing the lines of tungsten at around 3.2 keV.