Mastermind

Break the hidden 4-peg code — classic Mastermind with black/white key pegs, 6 colours, 12 guesses.

Break the 4-peg code in 12 guesses. Repeats are allowed. Black peg = right colour in the right slot; white peg = right colour in the wrong slot.

Colours
Your guess

Guess 1 of 12

The code is generated locally and judged by this browser. Nothing is sent anywhere.

How to use

  1. Pick four colours for a guess.
  2. Read the black (exact) and white (colour only) pegs.
  3. Deduce the code within 12 tries.

What it supports

Standard rules: 6 colours, 4 slots, repeats allowed, 12 guesses. Black pegs count exact matches; white pegs count colour matches in wrong slots via multiset scoring (a double-coloured guess never over-scores). The code is generated locally.

Related tools

Related guides