Code Breaker

A secret code of coloured pegs is hidden. Make a guess and read the clues: black means right colour in the right place, white means right colour in the wrong place.

right colour, right place   right colour, wrong place

How to play

  1. Tap colours to fill the empty pegs of your current row. Tap a peg to remove it.
  2. Press Check.
  3. Read the feedback: each black dot is a peg with the right colour in the right place; each white dot is a right colour in the wrong place. The order of the dots does not tell you which peg they belong to.
  4. Crack the code before you run out of rows.

Strategy tips

  • Start with a guess that uses several colours, such as 1-1-2-2, to learn a lot at once.
  • Every new guess should agree with all earlier clues.
  • When the number of black plus white dots stops changing, you know which colours are in the code.
  • With good play, 4 pegs and 6 colours can always be solved in 5 guesses or fewer.

Levels

Easy uses 6 colours without repeats. Normal is classic Mastermind: 6 colours where a colour may appear more than once. Hard has 5 pegs and 8 colours. Colours are also numbered, so the game is playable with colour blindness.

Frequently asked questions

Is Code Breaker free?

Yes, free with no download or sign-up.

Is this the same as Mastermind?

It uses the same classic rules as the code-breaking board game, in an original free version.

Can I use the keyboard?

Yes. Press 1–8 to add colours, Backspace to remove the last one and Enter to check.

Are my statistics saved?

Yes. Wins, games and average guesses are saved in your browser for each level.

Related tools