A strap lock comprises a female fastener, a male fastener, a key-unlocked unit and a numeral unlocking unit. The female fastener includes a first seat body and a second seat body movably mounted on the first seat body. The male fastener is detachably attached to the first seat body of the female fastener. Both the key-unlocked unit and the numeral unlocking unit are disposed on the second seat body. The strap lock can be unlocked by either one of the key-unlocked unit and the numeral unlocking unit.