Book of Knowledge · Category VI, Chapter 3 · 1206
The 12-letter lock: no key, no keyhole, just letters
A brass lock on the lid of a chest: four round windows, three letter dials in each, and a hidden plate that only slides when all twelve letters are right. Turn the dials in interactive 3D, cut the chest open to see the notches line up, then watch the film.
A chest locked by letters
In the last part of the Book of Knowledge, among doors, bolts and a protractor, al-Jazarī describes “a lock for locking a chest by means of 12 letters of the alphabet”. He made the chest himself, he says, and put the lock on its lid, in brass. The lid has four round holes; around each runs a ring of sixteen letters, chosen from the twenty-eight of the alphabet. (He does not say which sixteen; our model uses the first sixteen in abjad order.)

Three dials in each hole
- Disc 1, as thick as the lid, sits in the hole. It has an almond-shaped pointer that reads the lid's letters, and a little bird's head to turn it by.
- Disc 2, smaller, sits on top, with a knob and its own almond that reads the letters on disc 1.
- A rod runs through the middle, with a third almond that reads the letters on disc 2.

Hidden discs and the zigzag plate
Underneath, each dial is fixed to a hidden disc, and each hidden disc has a small triangular notch cut in its edge. Under the lid lies a brass plate, cut in two along a zigzag, with a triangular lug beside each stack of discs.

How it opens, and why it won't
Set all three almonds of a hole on the right letters and the three notches line up opposite the lug. Do it at all four holes, then turn the “earring”, the key-knob in the middle of the lid: a cam with four teeth pushes the two halves of the plate apart, each lug slides into its line of notches, and two hooks at the side let go of the latch, so the lid can be lifted. To lock it, turn the earring back so the halves close on the latch, and spin the dials away. Now the lugs hit solid brass and the plate cannot move.

Quick test: how many settings?
Each dial has sixteen letters, and each hole has three dials. How many different settings does one hole have?
Show the answer
4,096. Sixteen × sixteen × sixteen. And all four holes must be right at once: 16¹², about 281 trillion settings on paper.
A code you can change
Each hidden disc grips its dial with a single tooth set into one of sixteen nicks (the rod's disc uses a nail in one of sixteen holes). Take the lock apart, seat the tooth in a different nick, and the secret letters change. As Donald Hill points out, the locks could be reset to different combinations whenever desired.
The weak spot
Hill also spotted a weakness: the latch is hinged on the outside of the chest, so a thief with a crowbar could simply lever it open. A hinge inside the chest would have been better.

The first combination lock?
You will often read that al-Jazarī invented the combination lock. He did not, and he says so himself: earlier craftsmen, he writes, made letter locks with two, four and six circles. A brass box in the Museum of Fine Arts, Boston, dated 1197 (593 AH), already has a four-dial lock with an eight-letter code; it is attributed to Muhammad ibn Hamid al-Asturlabi al-Isfahani, an astrolabe maker. What al-Jazarī gives us is something rarer: the full recipe, every disc, notch and lug written down.
Watch the film
0:00Twelve letters, four windows, one brass chest0:23Title0:34A lock for a chest, worked by letters1:00Not the first, and he says so1:13One hole, taken apart: three dials1:42Underneath: hidden discs, notches, the zigzag plate2:00Let's open it2:27Locking it again2:38Quick test: how many settings for one hole?3:06The clever part: a code you can reset3:24Hill's verdict: a weak latch3:34Myth-check: the first combination lock?3:54The full recipe4:04Which machine next?4:09Twelve letters, sixteen nicks, one zigzag plate4:19More machines
Questions & answers
What is al-Jazari's combination lock?
Chapter 3 of Category VI of al-Jazarī's Book of Knowledge (1206) describes a brass lock he made for the lid of a chest, worked “by means of 12 letters of the alphabet”. The lid has four round holes; in each sit three nested letter dials, and below the lid a plate in two halves can only slide apart when all twelve dials show the right letters.
How does the lock work?
Each dial is fixed to a hidden disc under the lid, and each hidden disc has a triangular notch in its rim. When the three almond-shaped pointers of a hole sit on the right letters, the three notches line up. The plate under the lid carries a triangular lug beside each stack. Turning the key-knob (the “earring”) in the middle of the lid turns a cam with four teeth that pushes the two halves of the plate apart; the lugs slide into the notches and two hooks let go of the latch, so the lid can be lifted.
What happens if one letter is wrong?
That dial's notch is out of line, so the lug beside its stack hits solid brass and the half of the plate it is fixed to cannot move. The hooks stay in the latch and the lid stays shut.
How many combinations does it have?
Each dial has sixteen letters, so one hole has 16 × 16 × 16 = 4,096 settings, and all twelve dials together have 16¹², about 281 trillion, on paper.
Could the combination be changed?
Yes. Each hidden disc grips its dial by a tooth set into one of sixteen nicks (or, for the rod, a nail in one of sixteen holes). As Donald Hill notes, any of the locks could be taken apart and reset to a different combination whenever desired.
Did al-Jazari invent the combination lock?
No, and he says so himself: earlier craftsmen, he writes, made letter locks with four letters on four circles, two on two, and six on six. A brass box in the Museum of Fine Arts, Boston, dated 1197 (593 AH) and attributed to Muhammad ibn Hamid al-Asturlabi al-Isfahani, already has a four-dial lock with an eight-letter code. What al-Jazarī gives us is a complete written description.
Did the lock have a weakness?
Hill points out that the latch was hinged on the outside of the chest, so it would have been simple to force the chest open with a crowbar between the latch and the chest; a hinge inside the chest would have been better.
Sources
- Ibn al-Razzāz al-Jazarī, Kitāb fī maʿrifat al-ḥiyal al-handasiyya (The Book of Knowledge of Ingenious Mechanical Devices), 1206, Category VI, Chapter 3. English translation and notes: Donald R. Hill, 1974, pp. 199–201 and 267–269.
- Combination lock box, 1197 A.D./593 A.H., Museum of Fine Arts, Boston.
- A. Golan, Al-Jazari Combination Lock and the Boxes from Isfahan.
- The 3D model is a reconstruction from al-Jazarī's text and Hill's notes; the chest's size, the setting, the sixteen letters shown and the code are illustrative.
Next from the Book of Knowledge
Which machine should we open up next?
Clocks, automata, fountains and more are on their way. Tell us on YouTube which one you want next.