Code Breaker is a free online code cracking game in the style of Mastermind. The computer hides a code of four colours and you have ten tries to find it, guided by black and white clue pegs. It runs in your browser with no download or sign up, works on phones and computers, and keeps working offline once loaded.
Inspired by: Mastermind, the code breaking board game from the 1970s.
How to play Code Breaker
- Choose Repeats allowed or No repeats. This decides whether the secret code can use the same colour twice.
- Pick four colours for your guess by tapping the colours at the bottom, then press Check code.
- A black peg means one colour is right and in the right place.
- A white peg means one colour is in the code but in a different place. The pegs do not say which colour they are about.
- Use the clues to improve your next guess. You have ten rows.
- Crack the code before the rows run out to win. Fewer tries earn more points.
Controls
- Keyboard: Keys 1 to 6 pick colours, Backspace removes the last peg, Space or Enter checks your row.
- Mouse: Click a colour to place it, click a placed peg to remove it, then click Check code.
- Touch screen: Tap a colour to place it, tap a placed peg to remove it, then tap Check code.
Tips to score higher
- Open with two colours twice, such as red red blue blue. The first clue already tells you a lot.
- Treat every clue like a small puzzle. Ask which guesses it makes impossible.
- Change only one or two pegs between guesses so you can see what caused the clue to change.
- Write the colours you have ruled out in your head. A row with no pegs at all removes those colours for good.
- In No repeats mode, remember that each colour appears at most once in the secret.
The story behind Code Breaker
The board game Mastermind was invented in 1970 by Mordecai Meirowitz, a telecommunications expert in Israel, and went on sale in the 1970s, becoming one of the best known strategy games of its time. It was based on an older pencil game called Bulls and Cows, where players guess a hidden number. The idea of cracking a code from a few clues has stayed popular with puzzle fans, teachers and computer scientists. Many of us remember the plastic board with its tiny black and white pegs, and the proud moment of finding the code in the last row. This game keeps that feeling on any screen.
Questions players ask
Is Code Breaker free to play?
Yes. It is free with no sign up, no download and no purchases.
What do the black and white pegs mean?
A black peg is a correct colour in the correct place. A white peg is a correct colour in the wrong place.
Can the code have the same colour twice?
In Repeats allowed mode it can. In No repeats mode every colour in the code is different.
How many tries do I get?
You get ten tries. The game shows the code if you run out.
Can I play offline?
Yes. Open the page once with internet. After that it keeps working without a connection.