Individual x rays of 5.9 and 22.4 keV have been detected and energy analyzed in single pixels of a CCD image sensor. The results indicate the CCD operates as an array of tiny Si solid state detectors providing both high spatial resolution and x-ray energy discrimination. These devices will prove useful sensors at the focus of future x-ray telescopes.