Secret Code: the strategy to crack it in 4 or 5 guesses
By Arnaud, creator of procstd. Updated November 26, 2026.
In Secret Code, each answer rules out hundreds of combinations, as long as your guesses take it into account. Here is the method, on a real game.
Try it as you read: play Secret Code, free and ad-free.
The rules
A combination of colours is hidden. After each guess, the game answers: ● for each colour in the right place, ○ for each right colour in the wrong place. It does not say which ones.
At the Hard level, the code has 4 colours, all different, chosen from 6: there are 360 possible combinations.
1. The first guess counts the colours
Play 4 different colours. Since the code leaves out only 2 colours, at least 2 of yours are in it. The total of ● and ○ tells how many: if it is 2, the two colours you did not play must be in the code; if it is 3, only one of them; if it is 4, neither.
Every combination of 4 different colours is as good as any other to start: no need to look for a magic first guess.
2. Only play possible codes
Before each guess, check that it could be the code: replay in your head the answers you already got, as if it were the solution. If it contradicts a single answer, do not play it, it cannot win.
This one rule is enough to win fast. Always taking the first possible code, we played all 360 combinations: 4.15 guesses on average, and never more than 6.
A real Hard game, one guess per row. Combinations still possible: 360 → 48 → 13 → 1. The 4th guess is right.
3. Find the places
A ○ says a colour is there but not in that place: move it on the next guess. An answer with 0 ● is precious: no colour is in its place, which rules out 4 positions at once.
In the game above, the 3rd guess answers 4 ○: all 4 colours are found, none in its place. With the earlier answers, only one code is left.
The game's levels
Easy: 3 colours out of 5. Hard, the ranked level: 4 out of 6, all different. Expert: 5 out of 8. Hardcore: 6 out of 8, a colour may come back several times, and each missed guess costs 5 seconds.
Your turn
The rules, the levels and the frequently asked questions are on the Secret Code page. Each level has its own leaderboard.
Play Secret CodeOther guides
- How to solve a sudoku: the techniques that work
- Minesweeper: the patterns to know
- How to win at Solitaire: the strategy
- Wordle-style game in French: how to find the word
- 2048: the strategy to win
- How to win at FreeCell
- Nonograms and picross: the method to solve them
- Takuzu (binary puzzle): the techniques to solve it
- How to win at Spider Solitaire
- Killer sudoku: cage combinations and the rule of 45
- Kakuro: sum combinations and the method
- How to solve a Hitori
- Einstein's Riddle: the grid method
- Mahjong solitaire: which tiles to remove first
- How to solve a Slitherlink
- Masyu: the basic techniques
- Traffic Jam: getting the red car out
- Sokoban: the mistakes to avoid
- The 11 nets of a cube
- The Tower of Hanoi: solution and method
- How to solve a sliding puzzle
- The knight's tour: the method and the solution
- Calcudoku: how to solve a grid
- The fake coin puzzle: the method and the 12 coins solution
- How to win at Reversi: the three rules of strategy
- How to win at Four in a Row: the four rules
- How to solve a Skyscrapers puzzle: reading the clues
- How to solve a Tents puzzle: the method
- Yatzy strategy: which dice to keep and where to score
- Solo Battleships puzzle: the method to find the fleet
- How to solve a Crowns puzzle: the method
- How to solve a Bridges (Hashi) puzzle: the method
- How to solve a Light Up (Akari) puzzle: the method
- How to solve an Islands (Nurikabe) puzzle: the method
- How to solve a Suguru: the method
- How to solve a Mosaic puzzle: the method
- How to solve a Rectangles (Shikaku) puzzle: the method
- How to solve a Dominoes (Dominosa) puzzle: the method
- How to solve a Thermometers puzzle: the method
- How to solve an Inequalities (Futoshiki) puzzle: the method
- How to solve an Aquarium puzzle: the method
- How to win at Oware: the four reflexes