Device (10) for magnetically testing a chain (11) with several chain links (12), wherein the device (10) can be arranged on an axial section (21) of the chain (11) and is movable relative to the chain (11) or conversely the chain (11) is movable relative to the device (10) in the longitudinal direction (45a) of the chain (11), comprising: - a
magnet arrangement (20) with several magnets which are configured to form a
magnetic field (22) in the axial section (21), preferably in the longitudinal direction (45a) of the chain (11); - a guide device (19) for guiding the chain (11); - a sensor arrangement (24) with a plurality of
magnetic field sensors (25) which are arranged in a sensor area (43) in the axial section (21) on a line (26) encircling the chain (11);- a length measuring device (27) configured to determine the relative
path length (33) between the sensor arrangement (24) and the chain (11), wherein the length measuring device (27) has several
magnetic field sensors (53) arranged longitudinally (45a) to the chain (11), which are configured to detect relative movements between the device (10) and the chain (11); and - an evaluation unit (30) configured to receive measurement data (31) from the magnetic field sensors (25), to assign these data to a circumferential position (32) and the detected
path length (33) with spatial resolution, and to detect defects (34) in the chain (11) in the
spatially resolved measurement data (31).