To provide a locking device capable of improving safety.
The locking device is provided with a key switch having a key body turned by key operation, and a switch turned on/off by turning the key body; a locking mechanism; and a control device for receiving output signals of the key switch to output a locking signal or an unlocking signal to the locking mechanism. The key switch has two normally closed microswitches. During the normal operation of the key switch, there is no occurrence of such a situation that the output signals of the two microswitches are turned on in both. When the two microswitches are turned on in both, the control device recognizes the key body of the key switch to be broken, and does not output the unlocking signal to the locking mechanism regardless of the output signal of the key switch.