Duels

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

Challenge a friend

Start the game, then send the link. The first person to accept plays you.

Mode
Code length
Made of
Repeats

Links stay open 48 hours after the last move.

A blue strip with four hidden code tiles marked with question marks, above a paper slip of guesses with green and yellow pegs

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? 2 players · 1 minNewDuelsChessOne link. No sign-up. Your move. 2 players · 15 minNewDuelsReversiTrap their discs. Flip the board. 2 players · 8 minDuelsConnect 4Four in a row. Outsmart them. 2 players · 5 minRacesHangmanSame word. Fewer sticks win. 2 players · 3 minNewDuelsLiar’s DiceBid high, bluff hard, call “Liar!” 2 players · 6 minNewRacesGeo QuizFlags, capitals, rivers. Who knows the world better? 2 players · 3 minDuelsSea BattleHide your fleet. Hunt theirs. 2 players · 10 minNewDuelsSnakes and LaddersClimb the ladders, dodge the snakes! 2 players · 6 minBeat My ScoreReaction DuelWait for green. Then tap. Faster. 2 players · 1 minDuelsTic-Tac-ToeThree in a row. Thirty seconds. 2 players · 1 minNewDuelsMemory MatchFlip two. Remember everything. 2 players · 4 minDuelsFive in a RowFive in a row. The board is huge. 2 players · 6 minDuelsDots and BoxesClose the box. Take another turn. 2 players · 5 minDuelsLudoRoll a six. Race your pawns home. 2 players · 10 minNewDuelsDominoesMatch the ends. Block the line. Domino! 2 players · 6 minDuelsCheckersJump, capture, get crowned. 2 players · 10 minRacesCity Country RiverOne letter. Six categories. Go! 2 players · 3 minDuelsNine Men’s MorrisThree in a row. Take a stone. 2 players · 10 minDuelsBackgammonRoll, race, hit and bear off. 2 players · 15 minBeat My ScoreFive DiceSame dice. Better choices win. 2 players · 5 minRacesMinesweeper DuelSame minefield. Fastest sweeper wins. 2 players · 3 minNewRacesSudoku DuelSame puzzle, two clocks. Who solves it first? 2 players · 8 minNewRacesWord DuelSame word, six guesses. Who cracks it first? 2 players · 3 minNewRacesScience & Nature QuizPlanets, animals, the human body. Who knows more? 2 players · 3 minSealed RoundsRock Paper ScissorsLock in your throw. Reveal together. 2 players · 1 minRacesTyping RaceSame words. Type faster. 2 players · 1 minNewDuelsCrazy EightsMatch the suit. Eights are wild. Empty your hand first. 2 players · 5 min