Skip to main content

Code Breaker

A secret code is locked in the vault. Guess it, and after each try you find out how many digits are right. Use logic to crack it before you run out of tries.

Tries 0 of 10 · Streak 0

After each try: ● right digit, right place. ○ right digit, wrong place.

    Tries left: 10

    How to play

    1. Tap digits, or type them, to fill in your guess. The daily code has four digits from 1 to 6.
    2. Press Try it to see the result.
    3. Read the dots: ● for a right digit in the right place, ○ for a right digit in the wrong place.
    4. Use what you learned to make a better guess. Crack the code in 10 tries to win.

    In practice mode you can choose Easy, Normal or Hard. Hard has five digits from 1 to 8, which leaves over 32,000 possible codes.

    A strategy that works

    Random guessing wastes tries. Treat each guess as a question.

    • Open with two pairs. A first guess like 1 1 2 2 tests two digits at once, and it tells you more than four different digits would.
    • Count first, place later. Add up the dots to find out which digits are in the code. Then work out where they go.
    • Change one thing at a time. If you swap two digits and the dots change, you know something about those positions.
    • Use a digit you have ruled out as a blank. If 6 got no dots, then 1 6 6 6 tests only whether the first digit is 1.
    • Never repeat a guess that cannot be right. Before you submit, check that it fits every result so far.

    The maths behind it

    The daily code has 1,296 possibilities: six choices for each of four positions. In 1977, computer scientist Donald Knuth showed that the board game version with these same numbers can always be solved in five guesses or fewer. Our daily gives you ten, so there is room for mistakes.

    More games

    Try Cipher Sprint for a race against the clock, or the daily cryptogram for a slower word puzzle.

    Frequently asked questions

    How do you play Code Breaker?

    Enter a guess and press Try it. A filled dot means a digit is correct and in the right place. A hollow dot means the digit is in the code, but somewhere else. The dots do not say which digit they refer to, and that is the puzzle.

    Can digits repeat in the code?

    Yes. A code can be 1 1 3 6, for example. Each digit in your guess only earns one dot, so guessing 1 1 1 1 against that code gives exactly two filled dots.

    Is this the same as Mastermind?

    It is the same idea. Code breaking with exact and misplaced hints is an old pen and paper game known as Bulls and Cows, which later inspired commercial board games. This version uses digits and adds a daily puzzle.

    When does the daily code change?

    At midnight on your device. Everyone playing on the same calendar day gets the same code, so you can compare how many tries you needed.

    How does the streak work?

    Crack the daily code on consecutive days and your streak grows. Miss one day and a free streak freeze keeps it alive, once a week. Miss more and it starts again. Failing a code does not add to it. Your streak is stored only in this browser.