Use your first guess to test several different colors.
English
Crack the hidden color code
Play Mastermind
online for free.
Play Mastermind online
4-peg code
● exact position · ○ right color, different position
Game introduction
What is Mastermind?
Mastermind is a code-breaking logic game. Submit a row of colored pegs, then use the feedback to determine which colors and positions are correct.
A dark clue marks the right color in the right position; a pale clue marks the right color in a different position. Difficulty adds colors, code length or duplicate pegs.
- Category
- Logic
- Difficulty
- Easy–Expert
- Typical game
- 4–12 min
How to play
How to play Mastermind
- Choose colors to fill the current guess row.
- Submit a complete row to receive match clues.
- Use exact-position and wrong-position clues to refine the next guess.
- Crack the secret code before all attempts are used.
A little help
Mastermind tips
Keep confirmed positions unchanged while testing uncertain colors.
Remember that feedback pegs do not identify specific positions.
On duplicate mode, test whether a confirmed color appears more than once.
Good to know
Mastermind Frequently asked questions
Is Mastermind free to play online?
Yes. You can play the full Mastermind game free in your browser with no account, subscription or download.
What do the Mastermind clues mean?
A dark clue means one peg has the correct color and position. A pale clue means one color is present but placed elsewhere.
Can the secret code repeat a color?
Easy and Medium use unique colors. Hard and Expert may repeat colors.
Can I play Mastermind on a phone or tablet?
Yes. The game is designed for touch screens as well as mouse controls, with keyboard controls included where they suit the puzzle.