How Does a Pin Tumbler Lock Work?
A key works by lining up tiny spring-loaded pins at one exact gap. Here is how a pin tumbler lock decides which key turns, and why master keys are possible.
You slide a key into a front door, turn it, and the bolt moves. Push in a key that looks almost identical and nothing happens. The cylinder will not budge, even though both keys fit the slot perfectly.
The difference comes down to fractions of a millimetre inside a mechanism called the pin tumbler lock. Variations of it secure most house doors, padlocks and filing cabinets, and the basic idea has barely changed since the 1860s. Knowing how it works also explains why some keys cannot be copied freely and why some locks open with more than one key.
The short answer
- A pin tumbler lock has a rotating core (the plug) inside a fixed housing. The boundary between them is the shear line.
- Stacks of spring-loaded pins cross that boundary and stop the plug from turning.
- Each pin stack is split into a lower key pin and an upper driver pin. The correct key lifts every split to exactly the shear line at the same moment, so the plug is free to rotate.
- A wrong key leaves at least one pin straddling the shear line, and the plug stays jammed.
The basic principle: one gap, many pins
Picture two tubes, one inside the other. The outer tube is fixed in the door. The inner tube, the plug, holds the keyway and can turn. A cam on the back of the plug moves the bolt. If nothing crosses the thin gap between the two tubes, the plug spins freely.
The lock works by deliberately blocking that gap. Typically five or six vertical holes are drilled through the housing and into the plug. Each hole holds a stack of pins pushed downward by a small spring. With no key inserted, the springs force the upper pins partway into the plug, so they bridge the gap like bolts through two plates. The plug cannot rotate.
The trick is that each stack is cut into two pieces at a carefully chosen height. If every cut sits exactly at the gap, the stacks no longer bridge anything: the upper pieces stay in the housing, the lower pieces stay in the plug, and the plug turns.
How it works, step by step
- At rest. Springs push each driver pin down so it crosses the shear line and locks the plug in place.
- Key insertion. As the key slides in, its sloped cuts push the key pins up and down. The pins ride over the peaks and settle into the valleys.
- Alignment. When the key is fully inserted, each cut has a depth matched to its key pin. A deep cut lets a long key pin sit low. A shallow cut lifts a short key pin higher. Either way, the top of the key pin ends up flush with the shear line.
- Rotation. With every split aligned, no pin crosses the gap. Turning the key rotates the plug, and the cam drives the bolt.
- Return. When the plug turns back to its starting position and the key is withdrawn, the springs push the driver pins back across the shear line and the lock is secure again.
The science behind it
Tolerances decide everything
The lock only works if the parts are made accurately. Key pins come in a set of standard lengths, and key cuts come in matching standard depths. In many common systems the depths are numbered 0 (shallowest) to 9 (deepest), giving ten choices per position. The gap between plug and housing has to be small and consistent, and each pin has to be the right length within a very small margin. If a pin is slightly too short or too long, its split misses the shear line and the correct key will stick or fail.
This is also why worn keys eventually stop working. Brass wears down at the cuts, the pins sit a little lower than intended, and the margin runs out.
Counting the possible keys
The number of theoretically different keys is the number of depth choices raised to the power of the number of pin positions:
combinations = depths ^ positions
For a five-pin lock with ten depths, that is 10^5 = 100,000. Real systems use fewer. A key cutter has sloped sides, so a very deep cut right next to a very shallow one removes metal from the shallow cut, and its pin no longer seats correctly. Manufacturers therefore set a maximum adjacent cut specification (MACS), the largest allowed difference between neighbouring cuts. Many specify a MACS of 7.
The table below shows how the MACS rule reduces the count for a five-pin, ten-depth lock. These are approximate worked figures that count only the adjacent-cut rule; real manufacturers exclude further combinations for master keying and other reasons.
| Rule applied | Approximate number of valid keys | Share of theoretical total |
|---|---|---|
| No restriction | 100,000 | 100% |
| MACS 7 | about 79,700 | about 80% |
| MACS 5 | about 44,700 | about 45% |
| MACS 4 | about 27,100 | about 27% |
Even after restrictions, tens of thousands of combinations remain, which is enough to make it unlikely that a random key from another door will happen to fit.
Master keying: more than one shear line
Office buildings and apartment blocks often need one key that opens many doors. A locksmith achieves this by adding a thin extra pin, often called a master wafer or spacer, into some pin stacks. Each such stack now has two splits. One key aligns the lower split with the shear line, and a master key aligns the upper split.
The cost is security. Every extra split is another way for the stack to line up, so a master-keyed cylinder accepts more key combinations than intended. Locksmith literature describes master keying as a controlled loss of security, and careless keying can produce a cylinder with dozens of usable shear lines.
Real-world applications
- House and office doors. Typical door cylinders use five or six pin stacks.
- Padlocks. Many keyed padlocks use the same plug-and-pin design in a compact body.
- Master-keyed buildings. Hotels, schools and offices use hierarchies of master keys so staff can open groups of doors with one key.
- Restricted keyways. Some systems use patented key profiles so that blanks cannot be bought freely, which limits unauthorised copies. The mechanism inside is still a pin tumbler.
- Variants. Dimple locks and tubular locks rearrange the pins around the key, but they rely on the same shear-line principle. A similar principle of a part that only moves when all blockers clear appears in the ratchet mechanism, where a pawl decides which way a wheel can turn.
Common misconceptions
“The key turns the lock by pushing the bolt directly”
The key mostly acts as a pattern. Its job is to line up the pins. The force of turning is transferred through the plug and its cam, not through the cuts themselves.
“More pins always means a much more secure lock”
Extra pin positions increase the number of possible keys, but they do not address other weaknesses. Basic pin tumbler cylinders can be vulnerable to physical attacks that break or bypass the cylinder entirely. Higher-rated cylinders add features specifically designed to resist those attacks.
“Only one key can ever open a given lock”
In a simple, non-master-keyed lock, only keys that produce the same alignment will work, and duplicates of the original key do exactly that. In master-keyed systems, several different keys are designed to open the same cylinder.
Limitations and exceptions
- Wear and dirt. Worn keys, worn pins, dust and old lubricant can make pins stick, causing a lock to jam or work unreliably.
- Manufacturing variation. No lock is made perfectly, and the small differences between pin holes are one reason basic cylinders offer limited resistance to skilled manipulation.
- Security ratings matter more than pin count. In some markets, cylinders are tested against independent standards for resistance to drilling, picking, bumping and snapping. A rating is a better guide than the number of pins.
- Professional help. If a lock is jammed, a key snaps inside it, or you need a door secured, use a licensed locksmith rather than forcing the cylinder, which can damage the door or leave it unsecured.
Frequently asked questions
Why does a copied key sometimes not work?
Key duplication copies the original key’s cuts, including any wear. Small errors in the cutting machine, or a worn original, can leave one cut slightly off, so one pin misses the shear line.
What does “rekeying” a lock mean?
Rekeying replaces the key pins (and sometimes driver pins) with different lengths so a new key works and old keys stop working. The cylinder and door hardware stay in place.
Why should you not lubricate a lock with oil?
Thick oil can collect dust and grime inside the narrow pin holes, which makes pins sticky. A lubricant made for locks is the usual choice, and the lock manufacturer’s instructions take priority.
Are electronic locks replacing pin tumblers?
Electronic locks are increasingly common, but some still include a mechanical key cylinder as a backup, and the pin tumbler remains one of the most widely used lock designs in the world.
References
- Wikipedia. Pin tumbler lock.
- Lockwiki. Pin tumbler.
- Lockwiki. Shear line.
- Lockwiki. MACS (Maximum Adjacent Cut Specification).
- Gillespie, T. Locksmith Ledger. Thoughts on Master Keying.
Header photo: Ries Bosch on Unsplash.