Reprogrammable cylinder lock comprising: - A stator - A rotor rotating in the stator and having a keyhole to insert a key - A first plurality of key followers movable in corresponding first seats intersecting the slot so as to adapt to a key mapping - A second plurality of toothed pins carried by the rotor and movable between a retracted position in which the rotor rotates inside the stator and an extracted position in which rotation of the rotor is prevented to open the lock wherein the key followers and the toothed pins are movable between a disengaged position in which the key followers are free to move linearly in the seats with respect to the toothed pins to adapt to different mappings and a engaged position with the toothed pins and the key followers shape coupled to move together along the seats, said disengaged position being obtained in a reprogramming configuration of the lock, - A reprogramming insert connected to said key followers and movable in a reprogramming position to disengage the key followers from the pins in said reprogramming configuration; and - a tool to bring the programming insert to the reprogramming position and characterized in that the lock comprises a stop movable between an extracted position in which the programming insert is locked so that the key followers and pins are engaged and in a retracted position in which the programming insert is pushed elastically into the reprogramming position and wherein the stop comprises a magnetic material and the tool is also magnetic and of such polarity as to bring the stop into the retracted position when approached to the rotor. - A stator - A rotor rotating in the stator and having a keyhole to insert a key - A first plurality of key followers movable in corresponding first seats intersecting the slot so as to adapt to a key mapping - A second plurality of toothed pins carried by the rotor and movable between a retracted position in which the rotor rotates inside the stator and an extracted position in which rotation of the rotor is prevented to open the lock wherein the key followers and the toothed pins are movable between a disengaged position in which the key followers are free to move linearly in the seats with respect to the toothed pins to adapt to different mappings and a engaged position with the toothed pins and the key followers shape coupled to move together along the seats, said disengaged position being obtained in a reprogramming configuration of the lock, - A reprogramming insert connected to said key followers and movable in a reprogramming position to disengage the key followers from the pins in said reprogramming configuration; and - a tool to bring the programming insert to the reprogramming position and characterized in that the lock comprises a stop movable between an extracted position in which the programming insert is locked so that the key followers and pins are engaged and in a retracted position in which the programming insert is pushed elastically into the reprogramming position and wherein the stop comprises a magnetic material and the tool is also magnetic and of such polarity as to bring the stop into the retracted position when approached to the rotor.