In an X-ray generator which includes an electron beam generating unit which has a plurality of electron emitters and generates an electron beam corresponding to driven electron emitters, and a target electrode which generates X-rays with the irradiation position of an electron beam generated by the electron beam generating unit being an X-ray focus, the X-ray focus shape formed by a set of X-ray focuses on the target electrode is controlled by individually controlling driving of the plurality of electron emitters.