Inkpot LaneFree puzzle packFree puzzles

Secret Codes for Kids: Three Pencil Codes to Teach Tonight

Secret codes for kids you can teach tonight with a pencil: a shift cipher, the pigpen code and a binary picture, plus how to crack a code without the key.

Inkpot Lane · 29 September 2026 · 8 min read

In 1916, a year after graduating in English literature, a young woman went looking for work at a library in Chicago. Her name was Elizebeth Smith, and a librarian put her in touch with a wealthy man who ran a private research estate in Illinois. She was hired to help hunt for secret messages supposedly hidden inside Shakespeare's plays. The hunt never proved what it set out to prove, but it introduced her to ciphers. By the late 1920s, as Elizebeth Smith Friedman, she was breaking smugglers' coded radio messages for the U.S. Coast Guard, and one account of her work for the Coast Guard and other federal agencies credits her with solving over 12,000 coded messages by hand in three years. Paper, pencil and patience are enough to start with secret codes for kids.

The short answer: Three good first secret codes for kids are the shift cipher (every letter moves the same number of places along the alphabet), the pigpen code (every letter becomes a small shape from a grid) and a binary picture (rows of numbers that turn into a drawing). Each needs only a pencil and paper. Once a child can make one, let them try breaking one without the key.

"We only break 'em"

Friedman went on to lead a small codebreaking team. When a visitor tried to sell her a system for making codes, her reply was recorded as: "Our office doesn't make 'em, we only break 'em."

For a child, the fun is in both halves. Making a code shows how it works. Breaking one without being told the key is the part that feels like real detective work. So the evening below goes in that order: make three codes, then swap chairs and break one.

Secret code 1: the shift cipher

The Roman historian Suetonius wrote that when Julius Caesar needed to keep a letter private, each letter stood for the one three places further along the alphabet: D for A, E for B, and so on. That is why this is often called the Caesar cipher.

Make a shift strip. Cut two long strips of paper. Write the alphabet across each one in evenly spaced boxes, then write it again straight after, so each strip runs A to Z twice. Lay one strip above the other and slide the bottom one until its A sits under the top strip's D. The top letter is the code; the letter underneath is the plain letter. That is a shift of three.

With a shift of three, LOOK UNDER YOUR PILLOW becomes ORRN XQGHU BRXU SLOORZ.

Two alphabet strips, shown in two rows of thirteen letters. The top strip, labelled Code, reads D to Z and then A, B, C. The strip under it, labelled Plain, reads A to Z, so code D sits over plain A, E over B, and so on; the D over A pair is highlighted. Below, the plain message LOOK UNDER YOUR PILLOW is shown with its code, ORRN XQGHU BRXU SLOORZ.
A shift cipher for kids with a shift of three: each letter of the message is written as the letter three places further along the alphabet.

For a first code, leave the spaces where they are, write in well-spaced capitals, and tell the solver the shift. Decoding simply means moving back the same number of places. When three feels easy, try five, then eleven. The method stays the same; only the key changes.

Secret code 2: the pigpen code

Pigpen swaps letters for shapes, which makes a message look properly secret. Variations of it were used by Freemasons from the early 1700s, which is why it is sometimes called the Freemason's cipher.

Draw the key. Draw two tic-tac-toe grids side by side, then two large X shapes.

  • Write A to I in the nine spaces of the first grid, three to a row.
  • Write J to R in the second grid the same way, with a dot in every space.
  • Write S, T, U, V in the four spaces of the first X.
  • Write W, X, Y, Z in the second X, with a dot in each space.

Write each letter as its pen. A letter becomes the lines around its space. A sits in the top-left corner of the first grid, so it is drawn as the lines on its right and bottom, like a backwards L. E sits in the middle, so it is a full square. N is the middle of the second grid, so it is a square with a dot inside. The X letters become V-shaped arrows.

A pigpen code key. Two tic-tac-toe grids: the first holds A to I, three to a row; the second holds J to R the same way, with a dot in every space. Two X shapes: the first holds S at the top, T on the left, U on the right and V at the bottom; the second holds W, X, Y and Z in the same places, each with a dot. Below, four letters drawn as their pens: A, from the top-left corner, as the lines on its right and bottom, like a backwards L; E, from the middle, as a full square; N, the middle of the second grid, as a square with a dot inside; and S, from the top of the X, as a V shape.
A pigpen code key for kids: letters sit in two tic-tac-toe grids and two X shapes, and each letter is written as the lines around its space, with a dot for the second set.

Pigpen has more than one layout, so whoever writes a message and whoever reads it must use the same key. Keep yours on a card. A good first message is the child's own name.

The key above is the one printed on the toolkit page of our Code Breakers book, with 11 pigpen messages to crack after it.

Secret code 3: a picture hidden in binary

Computers represent data using bits, written as 1s and 0s. Digital pictures are built from tiny squares called pixels; in a simple one-bit picture, each pixel is either filled (1) or blank (0). This code turns that idea into a drawing.

The place values. Write five column headings: 16, 8, 4, 2, 1, each double the one to its right. To turn a number into binary, go from the biggest heading down and ask, "Does it fit?" If it does, write a 1 and subtract it. If not, write a 0. So 10 is 8 + 2, which is 01010.

The picture. Draw a grid five squares wide and five tall, and give the child one number per row, top to bottom: 10, 10, 0, 17, 14. In binary the rows are 01010, 01010, 00000, 10001 and 01110. Fill in every 1 and leave the 0s white, and a smiling face appears.

Then swap: the child draws a picture on graph paper and writes the numbers for you to decode.

Swap chairs: break a shift cipher without the key

This is Friedman's half of the job. Write a shift-cipher message, but do not say how far it was shifted:

P OPK AOL SHZA JVVRPL

Here is how a codebreaker gets in:

  1. Look for a one-letter word. In English it is almost always A or I. Here it is P.
  2. Test both guesses. If P stands for I, the shift is seven. If P stands for A, it is fifteen.
  3. Try the guess on the next word. Move each letter of OPK back seven places and you get HID. That is a real word, so the guess is probably right. Keep going and the message opens: I HID THE LAST COOKIE.
  4. No short words? Try every shift. There are only 25, and a patient solver can test each on the first word.

The habit that matters most is checking. A wrong guess is not a failure; it tells you which shift it is not. After that, hide a coded note in a lunch box, take turns as maker and breaker, and let the child choose the key. If breaking the message turns out to be the favorite half, the next step up is a cryptogram, where each letter is consistently replaced by another letter: How to Solve Cryptograms shows the method.

When they want more than one code

If the lunch-box notes turn into a request for another kind of code, that is the moment we made Code Breakers: Secret Codes, Ciphers & Computer Puzzles for Curious Kids for. It is for ages 8 to 12, starts where this evening does and goes further, in ten chapters and 120 puzzles:

  • Ciphers first: 14 shift-cipher messages, 13 keyword ciphers where the child builds the cipher alphabet from a word, and 11 pigpen messages.
  • Then ideas computers use: five-bit binary letters, base sixteen, 10 binary pixel pictures, following steps in order, sorting, logic gates, and "Debug This" lists with exactly one number that breaks the rule.
  • A lesson and one worked example open every chapter, and each puzzle is marked Easy, Medium or Tricky.
  • A codebreaker's toolkit at the front holds the alphabet, a five-bit binary table, the hex digits and the pigpen key, and all 120 answers are at the back. No computer is needed.

Decades after that first job, Elizebeth Friedman and her husband wrote a book examining the Shakespeare cipher claims, and dismissed them. Inside it they hid a message of their own, using Bacon's own cipher: "I did not write the plays. F. Bacon." Even professional codebreakers could not resist making one. A child can start the same habit tonight with two strips of paper and a pencil.

Sources

  • Elizebeth Smith Friedman: Riverbank Laboratories, her Coast Guard codebreaking, the "we only break 'em" remark and the hidden message in The Shakespearean Ciphers Examined (1957): Wikipedia.
  • Suetonius, Life of Julius Caesar, section 56, on Caesar's shift of three: Wikipedia, Caesar cipher.
  • The pigpen cipher and its use by Freemasons: Wikipedia, Pigpen cipher.

Frequently asked questions

How do you make a secret code for kids?

Start with a shift cipher. Write two alphabets, slide one by three places, and use the shifted row to replace each letter in a short message. Give the solver the shift at first; later, leave it out and let them try to crack it.

What is the easiest secret code for kids?

The shift cipher. Every letter moves the same number of places along the alphabet, so a child only has to remember one number, the key. A paper shift strip makes it quick to encode and decode.

What age can children start making secret codes?

A child who can read and write the alphabet confidently can start with a simple shift cipher with the key given, or a short pigpen message. Breaking a code without the key, or turning numbers into binary, gives them a longer puzzle to work through.

How do you crack a code without the key?

For a shift cipher, find a one-letter word (usually A or I in English), work out the shift each guess would mean, and test it on the next word. If there are no short words, try all 25 shifts on the first word.

Is the pigpen cipher the same everywhere?

No. The grid-and-dot idea is shared, but people arrange the letters differently, so the writer and the reader must use the same key.

What is binary code for kids?

Binary writes numbers with just two digits, 0 and 1. In a simple binary picture, those two digits become blank and filled squares, so rows of binary numbers turn into a small image. It is a paper puzzle, not a programming course.

More to read