Crack a hidden four-color code. Exact pegs match color and position; close pegs match color in another position.

Code room
Preparing the lock
Runs locally in this tab. No code or guesses leave your browser.
Rules
- Choose four colors from the six available pegs.
- Exact counts show digits in the correct place.
- Close counts show matching digits in another place.
- Crack the code in eight attempts.
A brief history
Mastermind was released as a code-breaking board game in 1970. Its compact feedback system turned logical deduction into a repeatable home game.
Privacy
The code and guesses are generated and stored only in this tab.