Code Breaker: crack your friend’s secret code
You pick a secret code, your friend picks one too. Take turns guessing: green means right digit, right place; yellow means right digit, wrong place. Whoever cracks the other’s code first wins. One link, no app, no account.
- 2 players
- About 4 min
- Watchable live
- Free, no sign-up

The classic logic game, played over a link
Code Breaker is one of the oldest pencil-and-paper games there is. With numbers it’s called Bulls and Cows; with coloured pegs, millions know it as the board game Mastermind. The idea fits in a sentence: guess a secret code, and after every guess you only learn how many of your digits are right, never which ones. From those two little numbers you work out the code like a detective.
On BeatMe you play it against someone you know. Each of you locks in a code for the other, then you take turns guessing. Make a game, send the link in any chat, and play live or one guess at a time. The codes stay on our server, so nobody can peek, and every hint is worked out there too.
How to play Code Breaker
Pick your secret code
Choose four digits (or colours) for your friend to crack. Your friend does the same for you. By default every digit appears only once.
Guess their code
On your turn, type four digits and tap Check. You get a green peg for every digit in the right place and a yellow peg for every digit that is in the code but somewhere else.
Work it out
Use the pegs to rule digits in and out. The Notes button lets you cross digits out on the keypad, just like on paper.
Crack it first
The first to get four greens wins. If the player who started cracks it, the other gets one last guess to draw. Rematch on the same link.
The rules in short
- Duel (the classic): you each pick a secret code and take turns guessing the other’s. Both of you always get the same number of guesses.
- Race: our server picks one code, and you both crack it at the same time. Fewer guesses win, and on a tie the faster player.
- Green means a right digit in the right place. Yellow means a right digit in the wrong place. You learn how many, never which ones.
- Code length: 3 for a quick game, 4 for the classic, 5 for a real puzzle.
- Digits or colours: digits 0 to 9, or six colours, each with its own shape, so they work for children and for colour blindness too.
- Repeats: by the classic rules every digit appears only once (as in Bulls and Cows), while colours may repeat; switch repeats on for a harder code like 7 7 0 1.
How to crack a code fast
Start with guesses that test many digits at once: 1 2 3 4, then 5 6 7 8. Between them, those two guesses tell you how many of the code’s digits are 9 or 0. Then move one digit at a time: if a green turns into a yellow, you know exactly which digit was in the right place.
Every guess should be one that could still be the answer. Check it against all your earlier hints before you tap Check. A good player cracks four different digits in five to seven guesses, and with practice you’ll get there too.
A fair game with hidden codes
Your code goes to our server and never reaches your friend’s phone until the game is over. The hints are worked out there too, so nobody can fake a peg. In a race, you see only your friend’s pegs, never their guesses, until you’re done yourself.
Code Breaker FAQ
Can I play Code Breaker online with a friend for free?
Yes. Start a game on this page and send the link. Your friend taps it and plays in the browser, with no app, no account and no cost.
Is this Bulls and Cows?
Yes. With digits it’s the classic Bulls and Cows: a bull is a right digit in the right place (our green peg), a cow is a right digit in the wrong place (our yellow peg).
Is this Mastermind?
It’s the same kind of code-breaking game, and with the colour option it plays much like it. Mastermind is a trademark of its owner, and BeatMe isn’t affiliated with it.
What happens if we both crack the code?
In a duel, both players always get the same number of guesses. If you both crack the other’s code in the same number of guesses, it’s a draw. In a race, the faster player wins a tie.
How long does a game take?
About four minutes live with four digits. You can also play one guess at a time: the link stays open for 48 hours after the last move.
More games for two
NewRacesSpeed MathSame sums. Who adds up faster?
NewDuelsChessOne link. No sign-up. Your move.
NewDuelsReversiTrap their discs. Flip the board.
DuelsConnect 4Four in a row. Outsmart them.
RacesHangmanSame word. Fewer sticks win.
NewDuelsLiar’s DiceBid high, bluff hard, call “Liar!”
NewRacesGeo QuizFlags, capitals, rivers. Who knows the world better?
DuelsSea BattleHide your fleet. Hunt theirs.
NewDuelsSnakes and LaddersClimb the ladders, dodge the snakes!
Beat My ScoreReaction DuelWait for green. Then tap. Faster.
DuelsTic-Tac-ToeThree in a row. Thirty seconds.
NewDuelsMemory MatchFlip two. Remember everything.
DuelsFive in a RowFive in a row. The board is huge.
DuelsDots and BoxesClose the box. Take another turn.
DuelsLudoRoll a six. Race your pawns home.
NewDuelsDominoesMatch the ends. Block the line. Domino!
DuelsCheckersJump, capture, get crowned.
RacesCity Country RiverOne letter. Six categories. Go!
DuelsNine Men’s MorrisThree in a row. Take a stone.
DuelsBackgammonRoll, race, hit and bear off.
Beat My ScoreFive DiceSame dice. Better choices win.
RacesMinesweeper DuelSame minefield. Fastest sweeper wins.
NewRacesSudoku DuelSame puzzle, two clocks. Who solves it first?
NewRacesWord DuelSame word, six guesses. Who cracks it first?
NewRacesScience & Nature QuizPlanets, animals, the human body. Who knows more?
Sealed RoundsRock Paper ScissorsLock in your throw. Reveal together.
RacesTyping RaceSame words. Type faster.
NewDuelsCrazy EightsMatch the suit. Eights are wild. Empty your hand first.