Disclosed is a padlock. The padlock comprises a lock body, a U-shaped lock beam, hard balls and a lock core, wherein the lock core is located inside the lock body, a lock beam compressed spring is arranged between one end of the lock beam and the lock body, the lock core is used for locking or loosening occlusion of the lock beam and the hard balls, the lock core comprises a lock latch and a lockcatch, the lock latch is located at the upper portion of the lock catch, and the lock catch is internally provided with a lock latch cavity; when the lock latch cavity moves to the lower portion of the lock latch, the hard balls can be separated from the lock beam, and the lock latch can move downwards and can be partially embedded into the lock latch cavity; two hard balls are arranged, and the lock latch is located between the hard balls. By means of the padlock, the design of the structure of the lock latch is optimized, through the further utilization of the lock catch, the lock latch conveniently moves vertically, occlusion of the hard balls and the lock beam is conveniently locked or loosened, and unlocking or locking is achieved; a motor and an unlocking part are additionally arranged, and the lock catch conveniently moves; meanwhile, through the further utilization of the mechanical lock core, the lock catch can also move, so that the padlock has the functions of mechanically locking and electrically locking simultaneously.