A safety switch with detection of the end-stroke of the unlocking mechanism adapted to supervise a safety access of a machine or industrial plant, comprising: - a switching device adapted to be associated to the fixed part of an access to be supervised and having switching means adapted to be operatively connected to one or more control and/or service circuits of the plant for the control thereof, - an operating device associated to a movable part of the access to interact with said switching means at the time of opening/closing of the access for opening/closing of one or more of said circuits; - an unlocking mechanism housed in said switching device and having an unlocking pin adapted to translate with maximum predetermined stroke from a blocking position of the access to an unlocked position to determine the opening of said switching means; - means for the detection of the stroke of said unlocking pin; - a logic control unit adapted to operate said switching means and said unlocking mechanism as a result of the interaction of said switching device with said operating device; wherein said unlocking mechanism comprises an electromagnet adapted to promote the translation of said unlocking pin; characterized in that said detection means comprise a first detector adapted to detect the start of the stroke of said unlocking pin and a second detector adapted to detect the end of the stroke of said unlocking pin and in that said logic control unit is designed to open said switching means already after the only detecting operated by the first detector and in that said electromagnet is adapted to promote the translation of said unlocking pin from the start to the end of the stroke and to hold it in said end-stroke position. - a switching device adapted to be associated to the fixed part of an access to be supervised and having switching means adapted to be operatively connected to one or more control and/or service circuits of the plant for the control thereof, - an operating device associated to a movable part of the access to interact with said switching means at the time of opening/closing of the access for opening/closing of one or more of said circuits; - an unlocking mechanism housed in said switching device and having an unlocking pin adapted to translate with maximum predetermined stroke from a blocking position of the access to an unlocked position to determine the opening of said switching means; - means for the detection of the stroke of said unlocking pin; - a logic control unit adapted to operate said switching means and said unlocking mechanism as a result of the interaction of said switching device with said operating device; wherein said unlocking mechanism comprises an electromagnet adapted to promote the translation of said unlocking pin; characterized in that said detection means comprise a first detector adapted to detect the start of the stroke of said unlocking pin and a second detector adapted to detect the end of the stroke of said unlocking pin and in that said logic control unit is designed to open said switching means already after the only detecting operated by the first detector and in that said electromagnet is adapted to promote the translation of said unlocking pin from the start to the end of the stroke and to hold it in said end-stroke position.