Mastermind

Crack the hidden four-colour code in ten guesses.👆

About Mastermind

Mastermind is the classic two-player code-breaker distilled into a duel between you and a hidden pattern: a secret code of four colours drawn from six, repeats allowed, and ten guesses to crack it. Each guess comes back not as a yes or no but as pegs — a black peg for every colour that is right and in the right spot, a white peg for a colour that belongs in the code but sits in the wrong place — and reading those pegs correctly is the entire skill. The disciplined way to solve it is to change just one thing between guesses so each new clue isolates a single fact, and to keep black and white pegs mentally separate, since black nails a position while white only confirms a colour is somewhere in play. Beginners forget that colours can repeat, so a stingy peg count never fully rules a colour out. Treat it as elimination first — establish which colours are in before you fret over exactly where they go. It plays free in the browser on any device, no download required.

How to play

  • A secret code of four colours (from six, repeats allowed) is hidden.
  • Build a guess from the colour palette and submit it.
  • A black peg means a colour is right and in the right spot; a white peg means a colour is right but in the wrong spot.
  • Use the clues to crack the code within ten guesses.

Strategy & tips

  • Start with a guess that uses two different colours to learn which are in the code.
  • Track black versus white pegs carefully — black is position-perfect, white is right-colour-wrong-place.
  • Change one thing at a time between guesses so each clue tells you something specific.
  • Remember colours can repeat, so a low peg count does not rule a colour out entirely.
  • Use elimination: rule colours in or out before worrying about their exact positions.

FAQ

How does the feedback work?

Each guess returns black pegs (right colour, right spot) and white pegs (right colour, wrong spot), never double-counting a peg.

Can colours repeat in the code?

Yes. The secret can contain the same colour more than once, which makes the puzzle trickier.

Is Mastermind free?

Yes — it plays free in your browser with no download or sign-up, on desktop and mobile.

How many guesses do I get?

Ten. Crack the four-colour code before you run out to win.