Code Breaker
271.7K playsCrack the secret color code! Fill a row with colored pegs and press Check, and the clues tell you which colors are right and which are in the wrong spot. Use every clue to work out the code in as few guesses as you can. Little players get a clue on every peg, older ones get the classic black and white pegs, and in 2 Players mode you can hide a code for a friend to crack.
Hidden pegs. Sneaky colors. A handful of tries. Code Breaker for kids is a free color-code puzzle: the computer hides a row of colored pegs, you guess, and after every guess a clue tells you how close you got. You keep guessing until you crack the whole secret code. It has four levels for kids from 2 to 12, and you play it right in your browser on a computer, tablet or phone, with nothing to download and no sign-up.
Every peg has a color and a little white shape, like a red heart or a blue circle. Little players get a clue on every single peg. Older players get the trickier classic clue, two numbers that say how many pegs are right but never which ones. That is where the real detective work starts! π΅οΈ
π A Secret Hidden in a Row of Pegs
At the top of the board sits the secret row. It shows only gray pegs with question marks, so you can't peek. Your job is to fill your own row with colors and press Check. The game then compares your guess with the secret and gives you a clue.
The clue answers two questions. Is a color in the right spot? Or is it in the code, but somewhere else? Step by step, the clues squeeze the secret out into the open. You win when your guess matches the code exactly. If you run out of guesses first, the game shows you the code, so you always find out the answer.
Guessing games like this are old favorites. Long ago, people played a pencil-and-paper version with secret numbers called Bulls and Cows. In the 1970s it became a famous board game with colored pegs, often called Mastermind. KidWorld's version keeps that classic idea and adds kid-friendly clues, hints and a voice that can read every clue out loud.
π¨ Cracking Your First Code on KidWorld
Pick your level. The first time you play, the game starts you on Elementary. Tap Change Level to choose Toddlers, Preschool, Elementary or Tweens. The game remembers your choice next time.

Read the How to play box. Under the buttons it tells you how many pegs are hidden, how many colors there are, and how many guesses you get. Tap its π button to hear it read out loud.
Tap colors to fill your row. Each color button drops a peg into the next empty spot. A gold ring shows which spot fills next. On a computer, the number keys 1 to 7 pick the colors in button order.
Fix a mistake. Tap a peg in your row to take it out, and the gold ring jumps there. The Back button (or the Backspace key) removes your last peg.
Press Check. The big Check button wakes up and gently pulses once your row is full. Press it, or press Enter. Your guess slides up into the board with its clue.
Read the tip line. Under the board, the game says your clue in words, like "Guess 2: β 1 in the right spot, β 2 are in another spot." When you have 2 guesses left, and then 1, it warns you. Its π button reads the tip aloud.
Use a hint if you're stuck. The Hint button shows you one peg of the secret code. You get 1 hint on Toddlers and Preschool, and 2 on Elementary and Tweens.
Watch the counters. At the top you see "Guess 3 of 10" and a timer. The timer starts with your first tap.
Finish and play again. When the code is cracked, or your guesses run out, a result card shows the code, your score out of 100 and up to 5 stars. Tap New Code for a fresh secret, or Choose Another Level.
Use the page buttons. The play page also has buttons for fullscreen, music on or off, and reload to start a fresh game.
β Checks, Arrows and Crosses: Reading Your Clues
The clue is the most important thing in Code Breaker. There are two kinds, and your level decides which one you get.
A clue on every peg (Toddlers and Preschool)
After you press Check, each peg in your guess gets a small badge:
Green β means right color, right spot. Keep it there!
Orange β means this color is in the code, but in a different spot. Move it!
Gray β means this color is not in the code at all. Don't use it again.
On these levels, each color is used only once in the code, so every badge tells you exactly what it says.
The classic two-number clue (Elementary and Tweens)
Here, your pegs get no badges. Instead, two little counters sit at the end of the row. The green β number says how many of your pegs are the right color in the right spot. The orange β number says how many are the right color but in the wrong spot. A counter that shows 0 turns gray.
The tricky part: the numbers never say which pegs they mean. "β 1" means one of your pegs is perfect, but it could be any of them. Figuring out which one is the fun of the puzzle!
Two friendly helpers
From Preschool up, the game watches your guesses. If you guess something that can't possibly be the code, because it breaks a clue you already got, the tip says so: "Careful: that guess couldn't be the code, it doesn't fit the clue from guess 2." The guess still counts. It's a nudge to look back at your clues.
On Toddlers, Preschool and Elementary, each color appears only once in the code. A color that's already in your row looks faded, and tapping it makes the game say "Each color is used only once in this code."
π΅οΈ Code Breaker for Kids: Detective Moves That Really Work
Good code breakers don't guess wildly. They treat every clue like a piece of evidence. Here are the moves that help most, from easy ones to clever ones.
1. Make your first guess wide
Your first guess knows nothing, so let it test as many colors as it can. On every level, fill it with all different colors. Each one gets checked at once, and you learn the most.
2. Never waste a β color
Once a color gets a gray β (or a "0 and 0" clue says none of those colors are in), cross it out in your head. Putting it back in a later guess just burns a try.
3. Move every β peg to a new spot
An orange β tells you two things: the color is in the code, and it is not in that spot. So next time, try it in a spot where you haven't put it yet. If a color has been in two wrong spots on a 3-peg code, only one spot is left. That is a sure thing!
4. Make every guess fit all your clues
This is the biggest secret of all. Before you press Check, look up at each earlier row. Ask: "If my new guess were the secret code, would that row have gotten the same clue?" If the answer is yes for every row, it's a great guess.
Here is something special about KidWorld's Code Breaker. It was tested on every level with a player who only made guesses that fit all the clues so far. That player always cracked the code with guesses to spare. So you don't need luck, only careful looking.
5. Count, then place
On the two-number levels, first work out which colors are in the code, and worry about spots later. Add the β number and the β number together. That total is how many of your guessed colors are in the code. Once you know the colors, moving them around is much easier.
6. Use a "known wrong" color as a blank
On the Elementary and Tweens levels, a color you know is not in the code is a handy tool. Put it in a spot you don't want to test. It can never earn a β or β, so the clue only talks about the other pegs. This lets you test one or two spots at a time.
7. Spend free guesses before hints
Every level gives you some free guesses that don't lower your score (more on that below). A hint always costs points. So if you still have free guesses left, a careful guess is cheaper than a hint. Save the π‘ for when you are truly stuck.
8. Let the hint fill a gap
A hint shows one secret peg, and it likes to pick a spot your last guess got wrong. That peg then stays locked in place with a gold ring in every row after that. It also tells you the color is used up on levels without repeats, so you can cross it off for the other spots.
If you love solving with clues, try Who Owns the Pet?, a detective puzzle where clues like "Mia does not have the dog" help you work out which pet belongs to which kid.
π§© Five Codes Cracked Step by Step
You can't see the board inside this text, so let's walk through each code in words. Try to solve each step before you read the next one!
Code 1: Two pegs, four colors (Toddlers)
You guess red, blue. Red gets a gray β. Blue gets an orange β.
Red is out. Blue is in the code, but not in spot 2. With only 2 spots, blue must be in spot 1!
Green and yellow are left for spot 2. Guess blue, green. If green gets a β, the code is blue, yellow.
Even at worst, that's 3 guesses, and toddlers get 6.
Code 2: The Preschool puzzle in our picture
Guess 1 is red, blue, green. Red gets β, blue gets β, green gets β.
Preschool uses 5 colors and hides 3. Blue and green are out, so the code is red, yellow and purple in some order.
Guess 2 is yellow, red, purple. All three get β. Every color is right, but every spot is wrong.
Red can't be in spot 1 (guess 1) or spot 2 (guess 2). So red goes in spot 3.
Yellow can't be in spot 1, so yellow goes in spot 2. Purple takes spot 1.
The code is purple, yellow, red, cracked on guess 3! You can see the first two guesses in the screenshots below.
Code 3: Counting colors on Elementary
Elementary hides 4 pegs using 6 colors: red, blue, green, yellow, purple and orange. Each color is used once.
Guess red, blue, green, yellow. The clue is β 0 and β 2.
Add them: 0 + 2 = 2. So only 2 of your 4 colors are in the code.
The code needs 4 colors, and only purple and orange are left. So purple and orange are both in the code!
The β 0 also tells you red isn't in spot 1, blue isn't in spot 2, green isn't in spot 3 and yellow isn't in spot 4.
One guess, and you already know half the colors. Here's a fun fact: on Elementary, β plus β can never add up to less than 2, because with 4 pegs out of 6 colors, any guess shares at least 2 colors with the code.
Code 4: The "β 2, β 2" swap
Say your Elementary guess is green, purple, orange, red, and the clue is β 2 and β 2.
2 + 2 = 4, so all four colors are right.
Two pegs are in the right spot, and two are not. The two wrong ones must belong in each other's spots. They just need to swap!
Pick one pair and swap it, like green and purple. If the clue becomes β 0 and β 4, you swapped the two good pegs. Swap them back and try a different pair.
There are only 6 possible pairs, and each new clue rules out more of them.
Code 5: Same-color guesses on Tweens
Tweens is different: 5 pegs, 7 colors (pink joins the team), and a color can be used more than once. That means 16,807 possible codes!
Try a guess with all five pegs red. Say the clue is β 2 and β 0.
When every peg is red, any red in the code lines up with one of your reds. So β simply counts the reds in the code. There are exactly 2 reds.
β is always 0 on a one-color guess, because there's no "wrong spot" left for a red to be in.
Now you can mix. A guess like red, red, blue, blue, blue tests two ideas at once: are the reds in spots 1 and 2, and how many blues are there? Compare the new clue with what you already know to untangle it.
One-color guesses are slow, but their clues are very easy to read. Mixing two or three colors per guess, like in the Tweens picture below, gets you there faster once you feel brave.
π How Your Score Is Counted
Each code starts at 100 points. Every level gives you a few free guesses, and only guesses past those cost points:
Toddlers: 2 free guesses, then 10 points for each extra one.
Preschool: 3 free guesses, then 10 points each.
Elementary: 5 free guesses, then 8 points each.
Tweens: 6 free guesses, then 7 points each.
A hint costs 15 points (12 on Tweens). A cracked code never scores below 25. If your guesses run out, you still get 10 points, and the card is titled "The Code Stayed Secret!"
Some examples: cracking an Elementary code in 7 guesses with no hints scores 100 β 8 β 8 = 84. Cracking it in 3 guesses with 1 hint scores 85. A Tweens code in 8 guesses with 1 hint scores 100 β 14 β 12 = 74. Scores of 90 or more earn all 5 stars, and 70 or more earns 4.
Crack a code with no hints and no extra guesses, and the card adds a special badge: "Super code breaker!" On Elementary and Tweens, the card also shows a chain called "Codes that still fit your clues," like 360 β 72 β 4 β β. It shows how many secret codes were still possible after each of your guesses. A big drop means that guess was a really smart one.
π From 2 Pegs to 5: Code Breaker at Every Age
The same game grows with your child. Each level changes how long the code is, how many colors there are, and what kind of clue you get.
πΆ Toddlers (ages 2β4)
Code Breaker for toddlers hides just 2 pegs, using 4 colors: red heart, blue circle, green triangle and yellow star. There are only 12 possible codes and 6 guesses, with a badge on every peg. When the site's sound is on, the game reads the rules and each clue aloud, which helps children who can't read yet. A grown-up sitting close by can point at each β, β and β and say what it means. The shapes help too: a child can say "the heart" even before they know the color names.
π Preschool (ages 4β6)
Code Breaker for preschoolers hides 3 pegs from 5 colors (purple moon joins in), with 60 possible codes and 8 guesses. The badges still sit on every peg. This is also where the "couldn't be the code" nudge switches on, gently teaching kids to check their new guess against the old clues.
π Elementary (ages 6β10)
Code Breaker for elementary kids is the classic puzzle: 4 pegs from 6 colors (orange square joins), 360 possible codes, 10 guesses and 2 hints. The clue becomes the two counters, so kids have to reason about which pegs the numbers mean. The counting trick from Code 3 is a great first strategy to teach here.
π Tweens (ages 10β12)
Code Breaker for tweens hides 5 pegs from 7 colors, and now colors can repeat. With 16,807 possible codes and 12 guesses, every clue has to be used well. Tweens who enjoy this kind of careful thinking will also like Firefly Lights, a meadow puzzle where each tap switches a firefly and its neighbors, so you have to plan which ones to tap.
π‘ Why Hunting for a Secret Code Is Great for Growing Brains
It turns "maybe" into "for sure." When a peg gets an orange β, a child learns that a clue can tell you where something is not. Putting several "nots" together to find the one spot left is real logical thinking, the same kind used in science and math.
It rewards looking back. The best guesses come from checking every earlier row. Kids learn to slow down, look at all the evidence, and only then act. The friendly "couldn't be the code" message helps build that habit.
It practices counting and comparing. On the two-number levels, adding β and β and comparing the total with the number of pegs is quick, useful math with a reason behind it.
It builds memory and patience. Keeping colors and spots in mind while planning the next move is a workout for short-term memory. For younger kids who are still building that skill, Sequence Recall is a fun warm-up: watch tiles glow in order, then tap them back the same way.
It's fair, so mistakes feel safe. Running out of guesses isn't scary. The game simply shows the code and says what it was, so kids can see where their thinking went off track and try a New Code.
It works for every kind of player. Each color has its own white shape, so children who find some colors hard to tell apart can still play. The π buttons read the tip and the rules aloud for kids who are still learning to read.
A note for parents and teachers
Code Breaker has no scary content, no chat and no timer that ends the game. The clock only shows how long you took. Children can play right away in the browser, without downloading anything or making an account. It's a calm way to practice logic, careful reading of clues, simple adding and patience. Try cracking a code together: take turns choosing the next guess and saying out loud why it fits the clues.
Ready to find out what's hiding behind those question marks? Pick your level, tap your first colors, and see how fast you can crack a secret in Code Breaker for kids. Every clue brings you one step closer! π
πΌοΈ See the Game in Action

A Code Breaker for preschoolers board with two guesses of three pegs, each peg wearing an arrows or cross badge

An Elementary Code Breaker board where a hint shows the first secret peg is blue, next to green and orange clue counts

The Code Cracked card with a four-peg code, a score of 85 out of 100 and the chain 360, 72, 4

A Code Breaker for tweens board with five hidden pegs, seven color buttons and three guesses already checked
More Mind Games
Island Bridges
Build bridges to join every island! Each island shows a number that tells how many bridges must touch it. Drag from one island to another to build a bridge, and drag again for a double bridge. Bridges go straight and can't cross, and all the islands must end up joined together. Finish the map and watch the little boats sail. A clever logic puzzle with a brand-new map every game.
Odd One Out
Spot the one picture that doesn't belong in the group before time runs out.
Magic Crossbow: Pattern Breaker
Red, blue, red, blue, blue... wait! Find the one that breaks the pattern and shoot it with your magic crossbow. Pop out the extra item or swap the wrong one, and the pattern is fixed. Simple two-color patterns for little ones, long tricky patterns with two breakers for big kids.
Sequence Recall
Watch the glowing tiles light up in order, then tap them back the same way β how many rounds can you remember?
Most Played Games
Tic-Tac-Toe
Play a game of Tic-Tac-Toe against the computer and see if you can outsmart it.
Chess
Play classic chess in 2D or 3D against the computer or a friend, with FIDE time controls, hints, and undo.
Category Sort
Decide whether each picture is an animal, food, toy, or vehicle before time runs out.
Connect Four
Drop your pieces and be the first to connect four in a row against the computer or a friend.
Comments (55)