Skip to content
Every Mechanism

Home How a Combination Lock Works

Three wheels, a cam and a fence

How a combination lock works

No keyhole and no key. Turn the dial right, left and right again, and three hidden wheels remember the numbers. When all three line up, the bolt comes free.

Crack a safe
3
wheels, one per number
100
numbers on the dial
1M
combinations
0
batteries
The lock of a safe with the door taken away: the brass dial at the front, its spindle running back to three brass wheels, the steel drive cam, the blue lever on top and the long steel bolt.

Video

How a Combination Lock Works - Inside a Safe Dial

Watch on YouTube

3D model · 360° · zoom

Turn the dial yourself

The safe is cut open: you are inside it, looking at the back of the door, and the lock case is see-through. Turn the dial with the knob below, or drag the dial itself, and watch the cam collect the wheels, the gates line up and the fence drop. Drag to look around, scroll or pinch to zoom.

Try itPress Dial 25-60-10 to watch the whole combination, or turn the dial yourself: right four times to 25, left three times to 60, right twice to 10, then left until the bolt stops.
Loading the 3D model…

Meet the parts

Twelve parts, one secret

Here is the lock taken apart, without the door: the dial at one end, the wheel pack pulled apart along its post with the red flies between the wheels, and the lever and the bolt lifted off the top. Tap any part, or pick a name below.

The lock taken apart: the brass dial and its spindle, the wheel post with three brass wheels pulled apart and red flies bridging the gaps, the steel drive cam with its drive pin, and the blue lever with its fence and the steel bolt lifted above them.

Hover or tap the picture. Gold rings mark every part.

Parts diagram

From the dial to the bolt

The numbers follow the drive. Numbers 1 to 9 go from the dial through the cam into the wheel pack. Numbers 10 to 15 go from the gates, through the fence and the lever, to the bolt.

The lock taken apart seen from the front, with fifteen numbered parts from the dial to the bolt.
    How it works, step by step

    Thirteen steps, three numbers

    The same steps as the video. Each picture is a moment from it; press Show me in 3D to set the model up for that step.

      A combination safe in an old bank office.
      Step 1 of 13

      A dial that remembers

        Try it

        Crack the safe

        This safe has a secret combination, but you can see inside it. Dial the proper way and stop each time a gate sits right under the fence. The numbers you stop at are the combination.

        Turn right until all three wheels are moving, and keep going until wheel 1’s gate reaches the fence. Then turn left, collect the wheels again and stop when wheel 2’s gate gets there. Turn right once more for wheel 3. Last, turn left: if all three gates are in line, the fence drops and the bolt comes back.

        0dial, and which way
        nonewheels turning
        0 of 3gates under the fence
        Lockedbolt

        The three wheels under the fence after a wrong last number: wheel 3's gate glows red, a little to one side of the others.
        One number off: wheel 3’s gate (red) is not under the fence.
        One wrong number

        Close is not good enough

        Pick any three numbers and the lock dials them the proper way. Each wheel’s gate stops wherever your number puts it. If even one is off, its gate stays out of line, the fence lands on that wheel’s rim and the dial just spins.

        This lock opens on 25-60-10. Try 25-60-14, or move the first number by one: the gates are 3.6 degrees apart for every number, and the fence needs all three within a fraction of that.

        –wheel 1’s gate
        –wheel 2’s gate
        –wheel 3’s gate
        Upfence

        How many combinations?

        A million, or fewer than you think

        A hundred numbers for each of three wheels makes 100 × 100 × 100: a million combinations. Trying them all, one every twenty seconds, would take more than seven months without a break.

        But most real locks forgive a near miss: if the lock opens within one number either side, trying every third number is enough. Change the dial, the wheels and the tolerance and see what happens to the time.

        1 000 000combinations on the dial
        1 000 000really different ones
        –to try them all, non-stop
        –on average, until it opens

        More to know

        Kinds, history and care

        Six kinds of combination lock

        Wheel-pack dial lockThe one on this page: a dial, a drive cam, a stack of wheels and a fence. Safes, vaults and gun cabinets.
        Four and five wheelsThe same idea with more wheels, and so more numbers to dial. A fourth wheel makes a hundred times as many combinations.
        Manipulation-resistantBetter locks keep the fence lifted clear of the wheels until the gates line up, so a careful ear or fingertip has nothing to feel.
        Dial padlockA small version of the same mechanism. The dial collects the wheels, and three gates in line let the shackle open.
        Thumbwheel lockLuggage and bike locks: each wheel is set by hand, straight to its number. When every notch is in line, the shackle slides out.
        Electronic lockA keypad, a chip and a small motor that draws the bolt. Codes can be changed in seconds, but it needs a battery.

        From dials of letters to bank vaults

        1. One of the oldest known combination locks, found in a tomb in Athens, had several dials instead of a keyhole.
        2. The engineer al-Jazari describes a chest lock opened by setting dials of letters, in his book of ingenious machines.
        3. Iron safes spread through banks and offices, and dial locks with wheels and a fence replace the key that could be copied or stolen.
        4. James Sargent invents a combination lock whose numbers can be changed with a key, without taking the lock apart.
        5. Sargent’s time lock: a clockwork that keeps the vault shut until morning, whoever knows the combination.
        6. Locks are tested and graded for how long they resist an expert, and the best keep the fence off the wheels while you dial.
        7. Electronic keypads are common, but dial locks are still made for safes and vaults, because they need no power at all.

        Dialing it right

        • Turn slowly and steadily, and stop exactly on each number. It is the stops that set the wheels, not the speed.
        • Count the turns: right four times to the first number, left three times to the second, right twice to the third, then left until the bolt stops.
        • If you go past a number, don’t turn back. Start again from the beginning: turning back moves the wheel you were setting.
        • Pick numbers well apart. On a lock like this one, a second number just above the first, or a third just below the second, lets one turn drag along a wheel that is already set.
        • Change the combination when people who knew it leave, and test a new one several times with the door open.
        • Don’t oil a lock yourself or spin the dial hard against its stop. Have it serviced by a safe technician.

        Things worth knowing

        Really a permutationThe order matters, so 25-60-10 is not the same as 10-60-25. Strictly speaking, a combination lock is a permutation lock.
        Changing the numbersIn many locks each wheel is two parts: a rim with the gate and a hub with the fly. A change key lets them turn against each other, moving the gate to a new number.
        Safecracking by feelOn simple locks the fence touches the wheels while you dial, and a skilled ear or hand can pick up tiny differences near a gate. That is why good locks give nothing away.
        Why four turnsEach wheel can need almost a full turn before it is picked up, so the cam must turn nearly three times to collect them all. The fourth turn brings you to the first number.
        No power neededA mechanical dial lock still works after years in a cupboard or in a power cut. There is no battery to go flat and no circuit to fail.
        Time locksSome vaults have clocks inside. Until the clock reaches the opening time, even the right combination does nothing.
        Quick check

        Four questions