Codebreaker Puzzle Generator & Solver
Solve Mastermind-style number lock clues or make your own mystery geocache challenge. Count digits in the correct position and digits that are correct but misplaced — with accurate handling of repeated digits.
Enter the recorded attempts
Choose the code rules, then enter each guess and its exact / misplaced feedback. The page also shows peg-style feedback previews so it feels more like Mastermind. Leading zeroes count.
Clues
3 attemptsSolution
The solver tests every allowed code against every reported attempt.
Create a unique puzzle
Pick your rules, and the generator will create attempts that leave exactly one possible code. The hidden answer is never included in the shared puzzle text or URL.
The challenge is generated on your device. No account, API, or database is needed. A few harder combinations may require more clues.
Share your challenge
Only reveal or copy the answer when you want to check your puzzle. Printing and sharing leave it out.
Puzzle preview
This is what you can put into your geocache listing.
Play Mastermind Codebreaker
Crack a secret random code. Each guess gives you exact and misplaced pegs. Green means the right digit in the right spot; gold means a right digit in the wrong spot.
Enter your guess
Start a gameSelect a position on the board, then tap a number below it. When all positions are filled, press Submit Guess.
Tap a position on the board, then choose its number. All previous guesses stay visible.
Mastermind board
Your guesses appear here with colored feedback pegs. Feedback indicates counts, not which individual digits match.
How codebreaker clues work
- Exact — a digit is correct and in its correct position.
- Misplaced — a correct digit appears in the code, but at a different position.
- Repeated digits are counted only as many times as they occur in both the guess and the secret. A digit cannot be counted twice.
- Example: secret 112 and attempt 121 gives 1 exact, 2 misplaced.
- For a genuine unique-answer puzzle, the result must be exactly one matching code.