Code breaker
A secret row of coloured pegs is hidden under the lid. Make a guess, read the clues and narrow it down until you crack the code before your tries run out.
Try 1 of 10
- Secret code: hidden
- Try 1, in progress
Played 0 · Won 0 · Streak 0 · Best streak 0
How to play
- Build a guess: tap colours to fill the holes from left to right, or tap a hole first and then the colour you want there. You can also drag a colour onto a hole.
- Press Check. Small pegs next to your row tell you how close you are:
- a filled peg: one of your colours is right and in the right place (exact);
- a ring: one of your colours is in the code, but in another place (misplaced);
- a dot: nothing.
- The small pegs don’t say which of your colours they refer to. That’s the puzzle.
- Crack the code before you run out of tries. Every colour also has its own shape (circle, triangle, square…), so the game works without telling colours apart.
Keyboard: number keys 1–8 pick colours, the arrows move between holes, Backspace deletes and Enter checks.
Levels
Easy
4 pegs, 6 colours, no repeated colours and 10 tries. A good place to learn how the clues work.
Classic
4 pegs and 6 colours, but a colour can appear more than once. 1,296 possible codes and 10 tries. The daily code uses this level.
Hard
5 pegs, 8 colours with repeats and 12 tries: 32,768 possible codes.
Two players
One player secretly sets the code, hides it and hands over the device. The other tries to crack it. Then you swap roles and keep score.
Feedback explained
An example
Say the secret is red, blue, blue, green and you guess blue, blue, red, red.
- The second blue is in the right place: 1 exact.
- Your first blue and one red are in the code, but elsewhere: 2 misplaced.
- Your second red finds no other red in the code: nothing.
Each peg of the secret is counted only once, so repeated colours never inflate the clues.
What zero tells you
A row with no pegs at all is great news: none of those colours are in the code, so you can rule them out everywhere.
Strategy
A good first guess
In the classic game, a guess with two pairs (like red, red, blue, blue) splits the possibilities best. Four different colours is a fine start in easy mode.
Only play codes that could be right
Before each guess, check it against every clue so far. If it couldn’t have produced one of those clues, it can’t be the secret. Switch on Show possible codes left to see how many candidates remain after each try.
Five guesses are always enough
In the 1970s, the computer scientist Donald Knuth showed that the classic game (4 pegs, 6 colours) can always be solved in five guesses or fewer. The idea: always choose the guess whose worst possible answer leaves the fewest codes. Our hint uses the same idea, picking among codes that still fit every clue.
Use the hint to learn
Hint fills your row with a code that matches every clue so far. Try to work out why it fits before pressing Check.
FAQ
Is the daily code the same for everyone?
Yes. It changes at midnight UTC and is the same in English and Spanish. Your streak and stats are saved in your browser.
Can I share my daily result without spoilers?
Yes. Copy your result to share only the clue pattern (● exact, ○ misplaced, · nothing), never the colours.
Is every code solvable?
Always. The clues are computed by the game, and the hint shows a code consistent with all of them, so the real secret can always be reached in time.
Does it work without colours?
Yes. Each colour has its own shape inside the peg and a spoken name for screen readers, and the clue pegs differ by shape (filled, ring, dot) and are read aloud as “2 exact, 1 misplaced”.