Play Code-breaking colour game (Guess) online Works — plays right here, unlimited puzzles
Guide updated October 2026 · Runs via WebAssembly (native port)
Guess is a code-breaking game. The computer picks a hidden row of four coloured pegs from six colours, and you have ten tries to find it. After each guess, small marker pegs say how many of your pegs are the right colour in the right place, and how many are the right colour in the wrong place. The puzzle is ready below; drag colours from the tray to build a guess.
Controls — what does what
| Action | Keyboard | Mouse / touch |
|---|---|---|
| Place a peg | Up/down to pick a colour, left/right to pick a spot, Enter (or number keys 1, 2, 3...) | Drag a colour from the tray to the spot |
| Remove a peg | D or Backspace | Drag it off the board |
| Hold a peg for the next guess | Space | Right-click the peg |
| Submit the guess | Move to the marker pegs, Space or Enter | Click the highlighted marker pegs |
| Fill in a suggested guess | H or ? | - |
| Label pegs with numbers | L | - |
| Undo / redo | U or Ctrl+Z / R or Ctrl+R | Game menu |
FREE This is the complete game, free. Open source under the MIT licence: the complete puzzle, with a new grid every time.
Guess is from Simon Tatham's Portable Puzzle Collection, © Simon Tatham and contributors, used under the MIT licence. Built from source by scripts/build-puzzles.mjs.
How to play
- The hidden code is a row of coloured pegs; by default four pegs from six colours, and colours may repeat.
- After each guess you get one black marker for each peg of the right colour in the right position.
- You get one white marker for each peg of a right colour that is in the wrong position.
- Find the code before your guesses run out (ten by default).
Sizes and difficulty
The Type menu has Standard (6 colours, 4 pegs, 10 guesses) and Super (8 colours, 5 pegs, 12 guesses). Custom sets the number of colours (2 to 10), pegs per guess and guesses, and whether repeated colours are allowed in the code (on by default) and whether you may use blank pegs in guesses (off by default, and they make it easier).
Solving tips
Open with guesses that test several colours at once, such as two pegs each of two colours, then use the feedback to narrow things down. Black and white counts together tell you how many of your colours appear at all, which is a good way to sort out the palette. Use hold markers to carry pegs you are sure of into the next row. Every new guess should be consistent with all the feedback so far.
Where this puzzle comes from
Guess is part of Simon Tatham's Portable Puzzle Collection, a set of about forty logic puzzles written by Simon Tatham and contributors and released under the MIT licence. Every grid is generated on the spot, so the supply never runs out, and for the grid-logic puzzles the generator makes sure each has exactly one solution, reachable by reasoning rather than guessing. The version here is the collection's own code compiled to WebAssembly; the Game menu can save a puzzle to a file and load it again, and the Type menu changes the size and difficulty.
Frequently asked questions
What do the black and white markers mean?
A black marker is a peg of the correct colour in the correct place. A white marker is a correct colour in the wrong place. The markers do not tell you which pegs they refer to.
Is this the same as Mastermind?
The default settings match the board game sold as Mastermind: six colours, four pegs and ten guesses. Guess also lets you change those numbers.
Is Code-breaking colour game free to play here?
Yes, with no limit on the number of puzzles. Guess is open-source software under the MIT licence, and every grid is generated fresh when you press New game.
Does it work on a phone or tablet?
Yes. A tap works as a click and the puzzle resizes to fit the screen. Puzzles whose controls use the right mouse button are easier with a mouse.
More you can play in your browser
Related guides
- Hidden balls laser deduction puzzle (Black Box)Play Black Box free online: fire laser beams into a grid and deduce where the hidden balls
- MinesweeperThe Minesweeper you remember — three board sizes, chording, first click always safe. Insta
- Sudoku (Solo)Play Sudoku free in your browser: endless generated puzzles from Trivial to Unreasonable,
- Light flipping puzzle (Flip)Play Flip free online: click squares to toggle them and their neighbours until every light
Want a game like this on your own site?
Code-breaking colour game (Guess) isn't ours to give away — we host it, we didn't write it. But eleven of the games here we did write from scratch, and those are free for anyone to put on their own page: one line of HTML, no account, no permission, no attribution beyond a credit line.