Code Breaker

Free online code-breaking puzzle · New puzzle every day · No sign-up

How to playLeaderboard
Hiding a code…

Code Breaker in a nutshell

Code Breaker is a guessing game where you try to find a hidden code of coloured pegs. After each guess, clues tell you how many colours are right and in the right place, and how many are right but in the wrong place. Use the clues to crack the code in as few guesses as you can.

  1. A code is hidden. A secret code of 4 coloured pegs is chosen, using up to 6 colours.
  2. Make a guess. Choose 4 colours in a row as your guess.
  3. Read the clues. A dark clue peg means one colour is right and in the right place. A light clue peg means one colour is right but in the wrong place.
  4. Clues are not in order. The clue pegs do not tell you which of your pegs they refer to. Working that out is the puzzle.

Read the full rules of Code Breaker

At a glance

Players
1 player against a hidden code
Length
3 to 10 minutes per code
Equipment
Coloured pegs usually 6 colours
Learn it in
2 minutes logic does the rest

Code Breaker questions

Can a colour appear more than once in the code?

On Normal and Hard, yes: a code such as red, red, blue, green is allowed. On Easy each colour is used at most once, in the code and in your guesses.

How are clues given when a colour is repeated?

Each peg in the code can only earn one clue. If the code has one red and you guess two reds, you will get at most one clue peg for red.

What is Bulls and Cows?

Bulls and Cows is an older pencil-and-paper version played with numbers. A bull is a right digit in the right place and a cow is a right digit in the wrong place.

How many guesses does it take?

With 4 pegs and 6 colours, every code can be solved in five guesses or fewer with perfect play. Most people take five to seven.

What is a good first guess?

Many players start with two colours, such as red, red, blue, blue. It tests two colours at once and makes the clues easier to read.