A magnetic lock, comprising: a housing provided with a receiving space therein; an electromagnetic body configured to be assembled within the receiving space of the housing with a top surface of the electromagnetic body being exposed through the housing when the electromagnetic body is assembled within the receiving space , to receive externally supplied electricity, and to generate a magnetic attraction force on the top surface of the electromagnetic body ; a positioning member configured to be fixed on an object, and has a first lateral side configured to abut against an outer lateral side of the housing ; and at least one clamp configured to, when the first lateral side of the positioning member abuts against the outer lateral side of the housing , clamp together an end edge of the positioning member and an adjacent end edge of the housing to fix the positioning member and the housing together, the magnetic lock being characterized in that : the clamp is formed by bending a metal wire and comprises: a first bent portion configured to, when the positioning member and the housing are clamped together by the clamp , abut against a second lateral side of the positioning member that is opposite to the first lateral side of the positioning member ; a second bent portion configured to, when the positioning member and the housing are clamped together by the clamp , abut against an inner lateral side of the housing ; and a connecting portion located between the first bent portion and the second bent portion . a housing provided with a receiving space therein; an electromagnetic body configured to be assembled within the receiving space of the housing with a top surface of the electromagnetic body being exposed through the housing when the electromagnetic body is assembled within the receiving space , to receive externally supplied electricity, and to generate a magnetic attraction force on the top surface of the electromagnetic body ; a positioning member configured to be fixed on an object, and has a first lateral side configured to abut against an outer lateral side of the housing ; and at least one clamp configured to, when the first lateral side of the positioning member abuts against the outer lateral side of the housing , clamp together an end edge of the positioning member and an adjacent end edge of the housing to fix the positioning member and the housing together, the magnetic lock being characterized in that : the clamp is formed by bending a metal wire and comprises: a first bent portion configured to, when the positioning member and the housing are clamped together by the clamp , abut against a second lateral side of the positioning member that is opposite to the first lateral side of the positioning member ; a second bent portion configured to, when the positioning member and the housing are clamped together by the clamp , abut against an inner lateral side of the housing ; and a connecting portion located between the first bent portion and the second bent portion . a first bent portion configured to, when the positioning member and the housing are clamped together by the clamp , abut against a second lateral side of the positioning member that is opposite to the first lateral side of the positioning member ; a second bent portion configured to, when the positioning member and the housing are clamped together by the clamp , abut against an inner lateral side of the housing ; and a connecting portion located between the first bent portion and the second bent portion . <EOS>