Code Breaker
Crack the secret color code in ten guesses.
Guess 1 of 10
● right color, right spot · ○ right color, wrong spot
How to play Code Breaker
Goal: Guess the hidden code of 4 colors within 10 tries.
- 1Fill all four slots with colors and press Check.
- 2A solid dot means a right color in the right spot.
- 3A hollow dot means a right color in the wrong spot.
- 4Colors can repeat in the code.
On a computer
Click a slot, then click a color
On a phone
Tap a slot, then tap a color
Play Code Breaker, a free logic game like Mastermind. Use feedback pegs to deduce the hidden four color code.
About Code Breaker
Code Breaker is a deduction game. The computer hides a code of four colored pegs chosen from six colors, and colors can repeat. You have ten guesses to find it. After each guess you get feedback: a solid dot for each peg with the right color in the right spot, and a hollow dot for each right color in the wrong spot.
This style of code guessing game goes back to an old pencil and paper game and became widely known as a board game in the 1970s. Our version is a free, original take on that classic, built for quick rounds in the browser.
Code Breaker is excellent logic practice because every guess should test an idea. It plays well on phones with large color buttons, and on desktop with a mouse.
A useful way to think about Code Breaker is as a process of elimination. With six colors and four slots there are 1,296 possible codes, and every guess, even a wrong one, cuts that number down. Good players choose guesses that split the remaining possibilities as evenly as they can, which is why careful players usually crack the code in five or six tries.
Code Breaker tips and strategy
- Start with a guess that uses two colors, two of each, such as red red yellow yellow. It tells you a lot quickly.
- Keep track of which colors have shown up at all. A guess with zero dots removes all those colors.
- Change one or two pegs at a time between guesses so you can tell which change caused the feedback to change.
- Remember that the dots do not tell you which pegs they refer to, only how many.
- Do not forget that colors can repeat in the code.
- Before each guess, check it against all earlier feedback. A guess that could not be the answer wastes a turn.
Code Breaker FAQ
What do the solid and hollow dots mean?
A solid dot means a correct color in the correct spot. A hollow dot means a correct color in the wrong spot.
Can colors repeat in the code?
Yes. The secret code can use the same color more than once.
What is a good first guess?
A pair pattern like two of one color and two of another gives useful feedback about four positions and two colors at once.
Is this the same as Mastermind?
It uses a similar classic code guessing idea, but Code Breaker is our own free game and is not affiliated with any brand.
How many possible codes are there?
With six colors, four positions and repeats allowed, there are 6 to the power of 4, which is 1,296 possible codes.