Skip to content
HowlumeAll topics

How does a lock and key work?

shear linehousing (fixed)plug (turns)Some pins block the shear line
1/5pins at the shear line
11111key cut code
3,125possible keys (5 pins × 5 depths)
Side cut-away of a pin tumbler lock. Each stack has a key pin (gold) and a driver pin (grey) pushed down by a spring. Click a column to change that cut of the key, then try to turn it.

Overview

Short answer

A pin tumbler lock is blocked by spring-loaded pairs of pins that cross the gap between the turning plug and the fixed housing. The right key lifts every pin pair by exactly the right amount, so all the gaps line up at that shear line and the plug can turn.

Most front doors use a pin tumbler lock, a design patented by Linus Yale Jr. in the 1860s from an idea that goes back to ancient Egypt. Its secret is a row of tiny spring-loaded pins that only line up perfectly for one shape of key. Try cutting your own key in the figure: click each column to change that cut.

Play with the figure, then press Next (or the → key) to go step by step.