Codebreaker is a code-cracking logic game in the tradition of Mastermind. A vault hides a four-digit code made from the digits 0 to 5. You enter a guess, and the vault answers with two numbers: how many digits are exactly right, and how many are right but in the wrong place. Use those clues to close in on the code.

Codebreaker at the start: four digit boxes showing 0 0 0 0 with the first position selected and an empty guess history below
Codebreaker at the start: four digit boxes showing 0 0 0 0 with the first position selected and an empty guess history below

The goal

Find the four-digit code before you run out of guesses. Each digit is between 0 and 5, and digits can repeat, so a code like 3 3 0 5 is possible.

Controls

  • Keyboard: Left / Right (or A / D) choose a position. Up / Down (or W / S) or Space change its digit. X submits the guess. P pauses.
  • Touch: use the arrow buttons, Cycle digit and Submit code below the board.

The selected position is shown in violet. Digits wrap round: up from 5 goes to 0, and down from 0 goes to 5.

Reading the clues

After each guess, a line is added to the history, for example "1 0 2 2 exact 1 misplaced 2".

  • Exact counts digits that are correct and in the correct position.
  • Misplaced counts other digits that appear in the code but in a different position.

Repeated digits are never double-counted. If you guess 2 2 2 2 and the code contains one 2, you get exactly one point in total, either exact or misplaced. The history shows your seven most recent guesses.

Your first round, step by step

  1. Press Start game. All four positions start at 0.
  2. Make a first guess that tests a couple of digits, such as 0 0 1 1, and submit it.
  3. Read the clue. Exact plus misplaced tells you how many of those digits are in the code.
  4. Try the remaining digits, for example 2 2 3 3 and then 4 4 5 5, to find which digits are in the code.
  5. Once you know the digits, move them around to work out their positions, watching how exact changes.
  6. When you submit the right code, the vault opens.

Scoring

Cracking the code scores 2,000 points minus 10 for each guess you submitted, with a minimum of 100. Fewer guesses mean a higher score. Using up all your guesses without the right code ends the run.

What changes from Chill to Expert

  • Chill: 12 guesses.
  • Standard: 10 guesses.
  • Expert: 8 guesses.

Standard gives you five minutes to crack every code and Expert two minutes 30 seconds; an empty clock ends the run, and Chill has no countdown.

Strategy tips

  • Count digits first. Exact plus misplaced tells you how many digits from your guess are in the code, regardless of position.
  • A zero result is valuable. If a guess scores exact 0 and misplaced 0, none of its digits appear anywhere in the code.
  • Change one thing at a time. When working out positions, swapping two digits and seeing exact go up or down tells you precisely which moved into place.
  • Use every earlier clue. Before submitting, check your new guess would have produced the same feedback against all your earlier guesses if it were the code.
  • Remember repeats. Codes can contain the same digit more than once, so don't rule that out.

Common mistakes

  • Treating misplaced as "wrong"; it means the digit is in the code, just elsewhere.
  • Counting a repeated digit twice when reading clues.
  • Re-testing digits already ruled out by a zero result.
  • Forgetting the code only uses 0 to 5, not 6 to 9.

Accessibility and sound

Codebreaker is silent unless you press ♪, every guess result is written beneath the board, and Text game status gives screen readers the full guess history. The text status reads your current digits, the selected position and every earlier guess with its exact and misplaced counts, so the game is fully playable from text.

Play it offline with Flight mode

Crack codes on a plane: while online, choose Flight mode · Save this game in the panel or Flight mode · Save game on the Codebreaker shelf card. The game is then stored for offline use. Clearing site data removes your saved Codebreaker, so re-save before you leave. Offline sessions are a good chance to practise a fixed opening guess, such as two pairs of digits, and to note how much each exact and misplaced count narrows the possible codes before you commit to a second guess.

Codebreaker part way through, with several guesses in the history showing their exact and misplaced counts
Codebreaker part way through, with several guesses in the history showing their exact and misplaced counts

Frequently asked questions

Can the code repeat a digit?

Yes. Each of the four positions is any digit from 0 to 5, so repeats are allowed.

What does misplaced mean?

A digit that is in the code but at a different position from where you put it.

Is the code different every game?

Yes. Each game hides a new random code.

Ready to play?

Codebreaker is free in your browser, with keyboard and touch controls and no account needed.

Play Codebreaker

Quick rules and controls for Codebreaker · More how-to-play articles