A portable instrument for two-dimensional X-ray fluorescence imaging was assembled with an X-ray source using a pyroelectric crystal, which was driven by a 9-V dry battery, a Si-PIN detector, a slit, and pulse motors. Line scanning for a mug and a knife-edge-scan of an iron sheet were carried out using this spectrometer. The sensitivity of the spectrometer was sufficient for elemental analysis of a mug using a 1 mm 2 slit, and several elements, such as Co, Ni, Zn, Pb and Zr, were detected. The estimated spatial resolution using a 0.8-mm pinhole was 3.5 mm.