A sludge magnetic separator adapted to be applied to a wall-mounted boiler of a heating plant; the separator comprises a filter device (10) integrated with a fluid shut- off valve (11), wherein the filter device is configured with a cup-shaped body (23) for housing a mesh filter, and a lid (14) having an inlet (15) for the fluid communicating with a first chamber (19), and an outlet (15) communicating with a second chamber (29). A cylindrical mesh filter (25) divides the cup-shaped body (23) in a central cylindrical chamber (27) and an annular chamber (28) arranged peripherically to the central cylindrical chamber (27), which communicate with the first chamber (19) respectively with the second chamber (29) of the lid (14). The filter device (10) further comprises a magnetic core (34) housed, removably from the outside, in a tubular seat (33) longitudinally extending into the central chamber (27) of the filter device (10), from an opening (23") at a bottom wall (23') of the cup- shaped body (23) slanted toward