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 Code

Other guides