🔐

Mastermind

Crack the secret 4-color code in 10 tries using peg feedback!

1
Guess
10
Max
Right color + position
Right color, wrong position
You won!
The code was:
More Games

More Games You'll Enjoy

About Mastermind

The classic code-breaking board game — a secret 4-color code is randomly generated and you have 10 tries to crack it. After each guess, you get black peg hints (right color, right position) and white peg hints (right color, wrong position).

How to Play

  1. Select a color from the palette at the bottom.
  2. Click the 4 pegs in the current row to fill in your guess.
  3. Click Guess to submit. Hints appear on the right.
  4. Use the hints to narrow down the code.
  5. Crack the code in 10 guesses to win!

Controls

  • Click palette color — Select a color to place
  • Click peg slot — Place selected color
  • Guess button — Submit your row
  • Clear button — Clear the current row

Frequently Asked Questions

Yes — by default the secret code can contain repeated colors, matching classic Mastermind rules.
A black peg means you have the right color in the right position. A white peg means you have the right color but it's in the wrong position. The pegs don't indicate which slot they refer to.
There are 6 colors. The secret code is 4 pegs long, chosen from these 6 colors with repetition allowed.