An anti-lifting device for sliding doors or windows, the sliding doors or windows being of the type comprising at least: - a fixed frame; - at least one mobile frame or sash which slides horizontally, opening and closing relative to the fixed frame, having a perimeter channel for slidably housing operating means; - a sliding unit (4, 5) comprising a pair of carriages connected to the lower rail of the sash and resting on a horizontal base track, allowing the sash to slide in both directions (F1, F2), opening and closing; - a control element, located on the sash, connected to the operating means and to closing means driven by the control element to define, respectively, a sash open configuration, allowing its subsequent opening sliding, and a sash closed configuration with the sash stile and the fixed frame stile opposite and in contact with each other; the anti-lifting device comprising - at least one first contact element or plug connected to and projecting from the sash upper rail close to the first upper corner of the sash formed by the upper rail and the stile, being located opposite the upper rail of the fixed frame, and designed in practice to prevent sash lifting relative to the fixed frame, the device also comprising at least one positioner/spacer element, slidably positioned in the portion of channel of the upper rail before the first contact element; the positioner/spacer element comprising, along its length, at least a second contact element or plug, projecting above the positioner/spacer element; the first end of the positioner/spacer element being rigidly connected to the first contact element for forming a single rigid anti-lifting unit formed by the first and second contact elements (11, 14) located along the upper rail; the device being charachterized in that it comprises at least two positioner/spacer elements (13, 13') comprising respective rod segments designed to rigidly connect the first contact element and the second contact element, at least a third contact element or plug slidably connecting, in series and alternating with the positioner/spacer elements (13, 13'), in the channel in the upper rail, and wherein each of the first and second contact elements or plugs (11, 14) comprising lower portions (11a, 14a) with two opposite undercuts and a lower protrusion, forming connecting means, for connecting with respective cavities at the respective ends (13a, 13b) of the positioner/spacer elements, and wherein each contact element (11, 14) comprising the lower portion (11a, 14a) for slidably connecting with the channel and an upper portion comprising a central body (11b, 14b) and a shaped or curved upper protrusion (11c, 14c) designed to make contact, if the sash is lifted, with the inner profile of the fixed frame rail. - a fixed frame; - at least one mobile frame or sash which slides horizontally, opening and closing relative to the fixed frame, having a perimeter channel for slidably housing operating means; - a sliding unit (4, 5) comprising a pair of carriages connected to the lower rail of the sash and resting on a horizontal base track, allowing the sash to slide in both directions (F1, F2), opening and closing; - a control element, located on the sash, connected to the operating means and to closing means driven by the control element to define, respectively, a sash open configuration, allowing its subsequent opening sliding, and a sash closed configuration with the sash stile and the fixed frame stile opposite and in contact with each other; - at least one first contact element or plug connected to and projecting from the sash upper rail close to the first upper corner of the sash formed by the upper rail and the stile, being located opposite the upper rail of the fixed frame, and designed in practice to prevent sash lifting relative to the fixed frame, the device also comprising at least one positioner/spacer element, slidably positioned in the portion of channel of the upper rail before the first contact element; the positioner/spacer element comprising, along its length, at least a second contact element or plug, projecting above the positioner/spacer element; the first end of the positioner/spacer element being rigidly connected to the first contact element for forming a single rigid anti-lifting unit formed by the first and second contact elements (11, 14) located along the upper rail; the device being charachterized in that it comprises at least two positioner/spacer elements (13, 13') comprising respective rod segments designed to rigidly connect the first contact element and the second contact element, at least a third contact element or plug slidably connecting, in series and alternating with the positioner/spacer elements (13, 13'), in the channel in the upper rail, and wherein each of the first and second contact elements or plugs (11, 14) comprising lower portions (11a, 14a) with two opposite undercuts and a lower protrusion, forming connecting means, for connecting with respective cavities at the respective ends (13a, 13b) of the positioner/spacer elements, and wherein each contact element (11, 14) comprising the lower portion (11a, 14a) for slidably connecting with the channel and an upper portion comprising a central body (11b, 14b) and a shaped or curved upper protrusion (11c, 14c) designed to make contact, if the sash is lifted, with the inner profile of the fixed frame rail.