CAN YOU BREAK THE CODE?
Mastermind Game
Crack the hidden code by analyzing clues, testing combinations, and using logic to uncover the secret sequence before you run out of guesses in this classic mind-bending puzzle.
About the Game
Mastermind is a classic code-breaking puzzle game for one or two players. The computer secretly creates a hidden code made of colored pegs. Your job is to work out that code using logic, deduction, and the clues you get after every guess.
This online version brings the feel of the physical board game to your browser. It has glossy, three-dimensional pegs, recessed peg holes, and a polished game board with seven board themes. Every color also carries its own symbol, so the game stays easy to read for players with color vision differences.
You can play on a desktop, tablet, or phone. Your game saves automatically, so you can refresh the page or come back later and pick up where you left off. The game also tracks your statistics, daily streaks, and achievements.
Mastermind rewards careful thinking over luck. Each clue narrows down the possibilities, and a good player can often crack the code in just a few guesses.
The objective is to find the hidden color code before you run out of attempts.
To win, your guess must match the secret code exactly, with every peg in the right color and the right position. In the standard game you get 10 attempts to crack a 4-peg code made from 6 colors. Fewer guesses mean a higher score.
After each guess, small markers appear beside your row:
The markers show only how many of each kind you earned. They never reveal which pegs are correct. The circle and diamond are different shapes, so you never need to rely on color alone to tell them apart.
Level
Beginner
Easy
Normal
Hard
Expert
Master
Code Length
3
4
4
5
5
6
Colors
4
5
6
7
8
8
Attempts
8
10
10
10
8
10
Duplicates
Off
Off
On
On
On
On
You can also create a custom game. Choose a code length of 3 to 6 pegs, 4 to 8 colors, and 6 to 15 attempts. You can turn duplicates on or off, set a time limit of 2, 5, or 10 minutes, and switch hints on or off.
A win earns 1,000 base points. You get bonuses for solving in fewer guesses, for unused attempts, for playing harder difficulties, for finishing quickly in Timed Challenge, and for completing the Daily Code. Each hint you use costs 150 points. A loss earns no points.
Mastermind is a code-breaking game in which you guess a hidden sequence of colored pegs. After each guess you get clues about how close you are, and you use logic to work out the secret code.
In the default Normal difficulty you get 10 guesses. Other levels give between 8 and 10 attempts, and custom games let you choose anywhere from 6 to 15. Limited Attempts mode takes three guesses away.
A gold circle means one peg is the right color in the right position. A silver diamond means one peg is the right color in the wrong position. An empty hole means that peg adds no clue.
No. The markers show only how many pegs fall into each category. Their order never reveals which peg earned which marker.
It depends on the difficulty. Normal, Hard, Expert, and Master allow duplicate colors. Beginner and Easy do not. In custom games you can turn duplicates on or off.
Exact matches are counted first and set aside. Each remaining peg in your guess is then matched against a leftover peg in the code at most once. This means a repeated color is never counted more times than it appears in the secret code.
It is a new code every day that is the same for every player. You get one official attempt per day, and your progress is saved if you refresh the page. Solving it on consecutive days builds a daily streak and earns bonus points.
Yes. Two-Player Pass-and-Play lets one person build a secret code and then pass the device to the other player. A handoff screen keeps the code hidden.
Yes, if hints are turned on. You get up to three hints per game. A hint can reveal a color in the code, check whether a color or position is correct, tell you whether the code repeats a color, or give a strategy suggestion. Each hint costs 150 points.
Yes. Your current game, settings, statistics, daily streaks, and achievements are saved in your browser. You can refresh the page and continue where you left off.
Start with a varied first guess, use empty feedback to rule out colors, and always make guesses that fit every clue you have so far. The Tips and Tricks section above covers more.
Yes. The game adapts to phones, tablets, and desktop screens, and it works with touch, mouse, and keyboard.
Yes. Every color has its own symbol, and the feedback markers use different shapes. You can switch on high contrast, larger pegs, larger text, reduced motion, and visible focus outlines. The game also supports full keyboard play.
Press 1 through 8 to select a color, the left and right arrow keys to move between positions, Enter to submit, Backspace or Delete to clear a position, Escape to close a panel or pause a timed game, and R to start a new game.
Yes. The sound button in the top bar mutes everything instantly. The settings also let you control sound effects, music, and volume separately.