Crack the Code is a free daily number puzzle. Every day there is one secret 4-digit code, the same for everyone. You have six tries to find it, and after each guess the colors tell you which digits are right. When you finish, switch to Time Attack and crack as many codes as you can before the clock runs out.
CRACK THE CODE
TIME ATTACK
Crack as many codes as you can before the clock hits zero.
Every code you crack adds time β more if you need fewer tries. Fail a code and you lose 15 seconds.
Tries get fewer and codes get longer as you level up. Chain fast solves for a combo multiplier and earn power-ups.
How to Play the Daily Number Puzzle
- First, type any 4-digit code with the on-screen keypad or your keyboard, then press Enter.
- Then, read the colors. Green means the right digit in the right spot, yellow means the digit is in the code but somewhere else, and gray means it is not in the code.
- Next, use the clues to narrow down the code with every guess.
- After that, crack it within six tries to keep your streak alive.
- Finally, share your result. It shows only the colors, so you do not spoil the answer.
Strategy: How to Crack the Code Faster
Since digits can repeat, there are 10,000 possible codes. Even so, a good strategy finds the answer in four tries most days. For example, start with a guess that uses four different digits, such as 1234, and follow with 5678. As a result, after two guesses you already know which eight digits are in the code or not, and only 9 and 0 remain untested.
Remember that digits can appear more than once. If a digit turns green and you still have one yellow left, try the same digit again in another spot.

Daily Mode and Time Attack Mode
In Daily mode everyone gets the same code, so you can compare results and build a streak. A new code arrives every day at midnight in your time zone. In addition, Time Attack mode puts you against the clock. You start with 90 seconds and every code you crack adds time, with a bigger bonus when you need fewer tries. A failed code costs 15 seconds. Tries drop from 6 to 4 as you level up, and codes grow to 5 and then 6 digits. Crack codes quickly to build a combo multiplier of up to x5, and every third code earns a power-up: Reveal shows one digit, Purge removes digits that are not in the code, and Freeze stops the clock for 10 seconds. Your best score is saved.
A Little Logic, a Little Code
This daily number puzzle is inspired by classic code-breaking games such as Mastermind and modern daily puzzles. It trains the same kind of thinking programmers use when they debug: test an idea, read the feedback and narrow things down. If you enjoy that, you might also like our guide on calculating subnets by hand, which is a puzzle of its own.
If you are curious about the history of this kind of game, read about Mastermind on Wikipedia, the 1970s board game that started it all.
Frequently Asked Questions
How does Time Attack work?
You race the clock. Each cracked code adds seconds, each failed code takes 15 away, and the run ends when the time reaches zero. Fast solves build a combo and power-ups help when you are stuck.
Is Crack the Code free?
Yes. This daily number puzzle is free, runs in your browser and needs no account.
When does the new code appear?
A new daily code appears at midnight in your local time zone. Time Attack is always available, so you never run out of codes.
Can digits repeat?
Yes. A code can contain the same digit more than once, for example 0277.
How does sharing work?
The share button copies your colored grid and the puzzle number, so friends can see how you did without seeing the code.
Are my stats saved?
Yes. Games played, win rate and streaks are saved in your browser.
More games: play our new stacking game Sky Stack, or race the clock in Bug Hunt or build an empire in Root Access. All our games and tools are on the free tools page. Or browse all our free browser games.