Summary: A Crack the Lock puzzle hides a code of three to five different digits behind a short list of guesses. Each guess comes with a clue saying how many of its digits are in the code and whether they sit in the right place. Exactly one code fits every clue, and the fastest way in is the clue that rules digits out completely.
Want to make your own? The Crack the Lock puzzle generator creates crack-the-code puzzles with answer keys, ready for print.
A Crack the Lock puzzle is a crack-the-code logic puzzle — the kind often shared as “Can you open the lock?”: a padlock, a few failed attempts at its code, and a sentence beside each attempt telling you how close it came. Nobody tells you the code. You work it out from what the wrong guesses got right.

The Goal
Fill the answer boxes with the code that fits every clue. The puzzle above has a three-digit code. Give it a try before you read on — the steps below open it in five short moves.
Crack the Code Rules
- The code uses different symbols. Most locks use the digits 0 to 9 (the rules below say “digit”), and no digit appears twice in the code or twice in a guess.
- Each clue counts two things about its guess. How many of its digits are in the code at all, and how many of those are also in the right position.
- “Correct and well placed” means the digit is in the code and in that exact box. “Correct but in the wrong place” means the digit is in the code, but in a different box.
- “Nothing is correct.” means none of the guess’s digits are in the code, in any position. When a puzzle has one, it is usually the best place to start.
- A clue can mix both. “One digit is correct and well placed, one more is correct but in the wrong place” means two of the guess’s digits are in the code: one in its exact box, the other in a different box.
- A clue accounts for every digit in its guess. “One digit is correct and well placed” also tells you the other digits of that guess are not in the code at all — if they were, the clue would mention them too.
- Exactly one code fits. Every puzzle is checked against every possible code, so the clues always lead to a single answer.
How to Solve a Crack the Lock: Five Steps
These steps solve the puzzle above. Clues can be used in any order; the trick is to pick the one that tells you the most.
- Start with “Nothing is correct.” Clue 3 rules out 4, 5 and 0 — they are not in the code anywhere. Strike them from every other guess.
- Read what is left of each guess. Clue 1 (3 0 6) has two correct digits, and 0 is out, so 3 and 6 are both in the code — but neither in its guessed position: 3 is not first and 6 is not third.
- Place the digit that can only go one way. Clue 4 (1 6 9) has exactly one digit correct and well placed. You already know 6 is in the code. If 6 were anywhere but the middle, the clue would have to say “in the wrong place”, so 6 is the middle digit — and 1 and 9 are out.
- Fill in what follows. 3 cannot be first (step 2) and the middle is taken, so 3 is the last digit.
- Finish and check. Clue 2 (9 7 5) has one digit in the wrong place; 9 and 5 are out, so it is 7, and 7 is not in the middle. The only box left is the first: the code is 7 6 3. Run it past every clue once more: 3 0 6 has 3 and 6 in the wrong places, 9 7 5 has 7 in the wrong place, 4 5 0 has nothing, and 1 6 9 has 6 well placed. The lock opens.

Working on paper? Cross out the ruled-out digits in every guess as you go. A guess with only one live digit left is usually where the next step comes from. If the page has a notes grid, cross out a box whenever you learn a digit cannot sit in that position, and circle it when you know it does.
The Three Levels
The level changes the clues, not the size of the puzzle:
- Easy gives you every clue you need plus up to two extra helper clues, including a “Nothing is correct.” clue whenever the lock has enough spare digits for one. Easy pages usually have the most clues and the gentlest start.
- Medium gives you only the clues you need — at least four — so every clue matters.
- Hard gives you only the clues you need and never a “Nothing is correct.” clue, so there is no free elimination to start from.
On Medium and Hard, every clue does work: take any one away and more than one code would fit. Fewer clues means a harder lock.
On the Easy lock below, clue 5 (7 1 0) clears three digits at once, and clue 3 (5 8 0) then tells you 5 and 8 are both in the code, with 8 not in the middle. Clue 1 (1 5 7) has one digit well placed, and 1 and 7 are out, so 5 is the middle digit — which also makes 5 clue 2’s well-placed digit, so 9 and 4 are out. Clue 4 (8 3 4) has one digit well placed and one in the wrong place. If 8 were not first, it would have to be last, and the well-placed digit would have to be 3 in the middle, where 5 already sits. So 8 is first, 3 is the misplaced digit, and it goes last: the code is 8 5 3.

Codes can be three, four or five symbols long. A longer code needs more clues and more care, and some puzzles add a notes grid to the left of the guesses — one row per digit, one column per position — for crossing out what each box cannot be.
On the Hard four-digit lock below there is no “Nothing is correct.” clue, so start where the most digits are pinned down: clue 4 (4 7 0 2) says three of those four are in the code. Try it before you read on.

One way through: suppose 7 is in the code. Then 7 is clue 2’s only digit, so 4 is out, and clue 4 needs 7, 0 and 2 — but then clue 1 (1 0 9 7) would have two correct digits, not one. So 7 is out, and 4, 0 and 2 are in. Clue 2 is now 4 (not last), so 6 and 3 are out; clue 1 is now 0 (not second), so 1 and 9 are out. That leaves clue 3 (6 5 1 3) with only 5, so 5 is second. Clue 4 says every digit is in the wrong place: 4 is not first and not last, so 4 is third; 2 is not last, so 2 is first; and 0 takes the last box. The code is 2 5 4 0.

Not every lock uses the digits 0 to 9. A puzzle can use fewer digits, numbers such as 23 or 56, letters, colours or pictures — the rules stay exactly the same, and the clue sentences name what they count (“Two colors are correct but in the wrong place”). When the symbols are anything other than the full set 0 to 9, the puzzle prints them in a column to the left of the guesses, so you know every possibility.
Try It Online
In the browser you tap an answer box, then tap a symbol to drop it in; the cursor moves to the next box, so a code goes in as quickly as you can type it. On a digit or letter lock you can also type the code straight in, use the arrow keys to move between boxes, and Backspace to clear one. The answer row lights up when the code is right. Play Crack the Lock in your browser — nothing to download. The general player controls — checking your answer, resetting, the timer, and working through a set — are covered once in How to Play Puzzles Online.
FAQ
What is a crack the code puzzle?
A logic puzzle that hides a code behind a few guesses. Each guess has a clue saying how many of its digits are in the code and whether they are in the right place, and you work out the one code that fits every clue.
Can a Crack the Lock puzzle have more than one answer?
No. Every puzzle is checked against every possible code, and only one fits all the clues.
Can a digit appear twice in the code?
No. The code and every guess use different digits, so once a digit is placed, it is out of every other box.
What does “Nothing is correct” mean?
None of that guess’s digits are in the code, in any position. Rule them all out at once — it is usually the best place to start.
Does “one digit is correct and well placed” say anything about the other digits?
Yes. The clue counts every digit of the guess, so the other digits in that guess are not in the code at all.
Do I have to use the clues in order?
No. The answer is the same whichever order you take them in. Start with “Nothing is correct.” if there is one; otherwise start with the clue that says the most digits are correct.
Who are Crack the Lock puzzles for?
Anyone who likes a short, satisfying deduction. Easy three-digit locks suit children who are just starting logic puzzles, roughly from age 7; Hard five-digit locks give adults a proper think. Colour and picture locks work for younger solvers too, with a grown-up reading the clue sentences aloud.
Further Reading
- How to Create Crack the Lock Puzzles in Puzzle Maker Pro
- How to Play Puzzles Online — checking, resetting and working through a set
- Puzzle Maker Pro Editions Explained — what each edition of Puzzle Maker Pro includes
Make Your Own Crack the Lock Puzzles
You know how the lock opens — now make your own: three-, four- and five-digit codes from Easy to Hard, each with its answer key, ready for a puzzle book, an escape-room worksheet or a classroom warm-up.
Create your own Crack the Lock puzzles with the Crack the Lock generator
Not ready yet? Try the free demo first — it covers every module.

