A secret colour code is hiding. Make a guess, read the clues, and deduce the code in as few guesses as you can.
Time
Guesses
Left
✓
right colour, right spot · right colour, wrong spot
Your Result
If Share doesn't show your score or isn't supported on your PC, tap Copy and paste it into Messages, WhatsApp, Instagram, Discord, X, or anywhere you prefer.
Goal: A secret code of coloured pegs is hidden. Work it out before you run out of guesses. Colours can repeat, and every peg also carries a number so you never rely on colour alone.
Step 1, make a guess: Fill every slot in the highlighted row. Tap a colour below the board to drop it into the selected slot, or tap a slot first to choose where it goes. On a keyboard, press 1–8 for colours and Backspace to delete.
Step 2, submit it: Press Submit guess (or Enter). The clue dots only appear after you submit. They show in the small cluster of dots at the right end of that row.
Step 3, read the dots: A gold dot means one peg is the right colour in the right position. A white dot means one peg is a right colour in the wrong position. An empty dot means nothing matched. The dots never say which peg earned them, and they are always listed gold first.
Step 4, plan the next guess: Use the dots to rule colours and positions in or out, then make a new guess that fits all the clues so far. Repeat until you get all gold dots, which means you cracked the code.
Example: If the secret is 1-2-3-4 and you guess 1-3-5-2, you get 1 gold (the 1 is in the right spot) and 2 white (3 and 2 are in the code but in the wrong spots). The 5 earns nothing because it is not in the code.
Levels:Easy uses 4 pegs and 6 colours with 10 guesses. Medium uses 4 pegs and 8 colours with 10 guesses. Hard uses 5 pegs and 8 colours with 12 guesses.
Daily Puzzle: Everyone gets the same secret code each day, with one scored attempt per level per day. Use Practice for unlimited random codes. Your share text includes a spoiler-free clue grid.
Mastermind Strategy
Open with a split guess: On 4 pegs, something like 1-1-2-2 tests two colours at once and tells you quickly which are in the code.
Every guess must be possible: Before submitting, check that your guess could be the answer given all earlier clues. Guesses that contradict old clues waste a turn.
Count the totals: Add gold and white dots to see how many pegs of your guessed colours are in the code. Then use position swaps to separate gold from white.
Five is enough on Easy: Computer scientist Donald Knuth showed in 1977 that any 4-peg, 6-colour code can be cracked in five guesses with perfect play.
About Mastermind
Mastermind is a code-breaking game invented in 1970 by Mordecai Meirowitz. Every guess is a small experiment: you gather evidence, discard impossible codes, and narrow down the answer. That is deductive reasoning in its purest form, which is why it appears in so many logic and puzzle collections.
Built for fun practice and benchmarks, not medical or educational assessment. Your scores are saved only in this browser.