Rulebooks · Logic puzzle · 1 player

How to play Codebreaker

Codebreaker is a code-guessing game. A row of colored pegs hides behind the shield. Guess it, and the key pegs tell you how close you came.

Play Codebreaker nowFree · no sign-up

The goal

Work out the hidden code in as few guesses as you can. You have to break it before the rows run out.

Words to know

  • The code is a row of colored pegs. It hides behind the shield at the top of the board.
  • A peg is one colored piece. Each spot a peg goes in is a hole.
  • A guess is a row of pegs you think might be the code.
  • Key pegs are the small pegs beside each guess. They tell you how close it came.

The rules

  1. Fill your row with pegs, one in every hole. Then press Check.
  2. The key pegs answer:
    • a red one for each peg of the right color in the right hole
    • a white one for each other peg whose color is in the code, but in another hole
  3. Keep guessing until you break the code, or the rows run out.

The key pegs never say which of your pegs they mean. That’s for you to work out. Each peg in the code answers one of yours at most. So if the code has one blue and you guess two, only one of them can get a key peg.

A guess you check stays on the board. You can’t take it back.

Example

The code is red, blue, yellow, blue. The guess is blue, blue, orange, red. The second blue is right where it is, so it gets one red key peg. The other blue and the red are in the code, but in other holes. They get two white key pegs. Orange isn’t in the code at all, so it gets nothing.

Levels

You pick a level before each code.

Level Colors Holes Same color twice? Rows
Easy 6 4 Never 10
Medium 6 4 Yes, twice or more 10
Hard 8 5 Yes, twice or more 12

In Easy, the code never has a color twice, so your guess can’t either.

How it ends

You win when a guess gets a red key peg for every hole. If you use up every row first, the code is lost. The shield lifts, and you see what it was.

Tips for getting started

  • If a guess gets no key pegs at all, none of its colors are in the code. That’s useful too.
  • Change only a peg or two from one guess to the next. Then you can tell what made the key pegs change.

Playing here

There’s no daily code. You get a fresh one every time, at the level you pick.

Moving

On a phone or tablet: Tap a peg in the tray to put it in the ringed hole of your row. The ring moves on to the next empty hole. Tap a hole in your row to ring it. Tap it again to take its peg out.

With a mouse: Click a peg in the tray to put it in the ringed hole of your row. The ring moves on to the next empty hole. Click a hole in your row to ring it. Click it again to take its peg out.

The button beside Check takes a peg out too. Check places your guess.

Give up ends it and shows the code. Press it twice to be sure.

Helpers

Helpers do some of the looking for you. You can turn any of them on or off in Options.

  • Shapes on the pegs: each color has its own shape, so you never have to tell a peg by its color alone. It starts on.
  • Say when the clues rule a guess out: Check warns you once if your guess can’t be the code, given the key pegs so far. Press Check again to guess it anyway. It starts on.
  • Count the codes that still fit: the game tells you how many codes still fit every answer so far. It gives a lot away, so it starts off.
  • Show what to do: a card tells you when there’s something new to do, and a soft ring shows where. It starts on.

Keys

With a keyboard: The numbers 1 to 8 put in a color. The left and right arrows move between holes. Backspace takes a peg out. Enter checks. P pauses. ? opens How to play. You can turn the number keys off with Shortcut keys in Options.

The clock

The clock runs only while you can see the board. Sign in to post your time. On the leaderboard, fewer guesses rank first. Then the quicker time wins. A code you don’t break isn’t posted.

Bigger than the screen?

On a phone or tablet: Pinch to zoom, or use − and +. Use two fingers to move around. One finger on the paper beside the board moves it too.

With a mouse: Use − and + under the puzzle, or pinch on a trackpad. Scroll to move around.

Ready to play?

Play Codebreaker now

Every game’s rulebook · Technical guide: how Codebreaker works