An X-ray line detector includes a housing and a predefined number of carrier modules having the same width disposed in the housing. A one-piece printed circuit board, on which a photodiode is arranged, is attached to each carrier module. Each printed circuit board is wider than an active area of pixels constituting the photodiode and ascintillator element is attached to each photodiode. Each scintillator element has a length that exactly covers the active area in the width thereof plus an interspace between two adjacent pixels of a photodiode. The width of each carrier module is at most twice as great as the length of a scintillator element. The carrier modules are arranged in two rows in the housing such that the photodiodes of each row are opposite each other, the scintillator elements abut against each other upon contact, and mutually contacting scintillator elements are arranged in respectively opposite rows.