By Kayla Walker ·
Secret Codes and Ciphers for Kids
Teach kids secret codes step by step: shift cipher, reverse alphabet, number code, pigpen cipher and lemon juice invisible ink, plus safety tips for heat.

The easiest way to teach secret codes is to start with a shift code, where each letter moves a few places along the alphabet. Once your child can write and crack those, try invisible ink made with lemon juice. Both use things you already have at home, and both turn spelling, patterns and logic into a game.
Work through five codes from simplest to trickiest: the shift cipher, the reverse alphabet, the number code, the pigpen cipher and lemon juice invisible ink. Younger kids can start with the number code and reverse alphabet; confident readers can handle shift and pigpen ciphers. An adult always handles the heat for invisible ink, and secret messages are for fun, never for leaving people out.
Codes vs. ciphers
Kids often use these words the same way, and that's fine. Strictly speaking, a cipher changes each letter, while a code swaps whole words or phrases. Everything below works with letters, so most of them are ciphers.
| Method | How it works | Good starting point for |
|---|---|---|
| Shift cipher | Each letter moves a set number of places | Kids who read comfortably |
| Reverse alphabet | A swaps with Z, B with Y, and so on | Younger kids, since there is no key to remember |
| Number code | Each letter becomes its place in the alphabet | Many five- and six-year-olds, with help |
| Pigpen cipher | Letters become shapes from a grid | Kids who read comfortably |
| Lemon juice ink | Hidden writing appears with heat | Any age, with an adult handling the heat |
1. The shift cipher
This is the classic starting point. It's also known as the Caesar cipher, named after Julius Caesar, who is said to have used it.
- Write out the alphabet. Put A to Z in a row across the top of a sheet of paper.
- Pick a secret number. Start with 3. This is the "key."
- Write a shifted alphabet underneath. Start the second row three letters along, so A sits above D, B above E, and so on. Wrap X, Y and Z back to A, B and C.
- Encode a message. Find each letter in the top row and write the letter below it. With a shift of 3, CAT becomes FDW.
- Decode it. Find each letter in the bottom row and read the letter above it.
Once they've got it, have them change the key. Only someone who knows the number can read the message easily.
Make a cipher wheel
A cipher wheel makes shifting faster. Cut two paper circles, one smaller than the other. Write the alphabet evenly around the edge of each, then pin them together at the center with a brad fastener. Turn the inner wheel to set the shift.
2. The reverse alphabet
In this cipher, A swaps with Z, B with Y, C with X, and so on. There's no key to remember, which makes it good for younger kids.
Write A to M in one row and Z to N underneath. Each letter swaps with the one directly above or below it.
3. The number code
Replace each letter with its place in the alphabet. A is 1, B is 2, and Z is 26. Put dashes between numbers so 1-2 isn't confused with 12.
HI becomes 8-9. Kids who like math can add a twist, such as adding 5 to every number.
4. The pigpen cipher
The pigpen cipher swaps letters for shapes. It looks mysterious, which kids love.
- Draw two tic-tac-toe grids. Fill the first with A to I, one letter per space. Fill the second with J to R, adding a dot in each space.
- Draw two big X shapes. Fill the four sections of the first with S to V. Fill the second with W to Z, adding dots.
- Encode. Each letter becomes the shape of the lines around its space, plus a dot if it has one.
Keep the key safe. Without it, the message looks like a row of strange symbols.
5. Invisible ink with lemon juice
Invisible ink is the perfect partner for a coded message. Lemon juice dries clear, then turns brown when heated.
What you need
- Lemon juice, fresh or bottled
- A cotton swab or small paintbrush
- Plain white paper or cardstock
- A small bowl
- An adult and a household iron
How to do it
- Pour a little lemon juice into the bowl. A few spoonfuls is plenty.
- Write the message. Dip the swab and write in large letters. Don't soak the paper.
- Let it dry completely. The writing should vanish.
- Reveal it with heat. An adult runs a hot iron over the paper. The message slowly turns brown.
Heat causes the sugars in the lemon juice to darken faster than the paper around them. That's why the hidden writing appears.
Safety and what to watch for
- An adult handles the heat. The iron gets very hot. Keep kids' hands clear and unplug it right after use.
- Skip flames and bulbs. Candles and lamps can scorch paper or start a fire. An iron, used by an adult, is a safer choice.
- Watch for stinging. Lemon juice stings small cuts and eyes. Wash hands afterward.
- Keep codes friendly. Talk about using secret messages for fun, not for leaving people out or hiding unsafe things.
Games to play with codes
- Treasure hunt. Hide coded clues around the house, each leading to the next. Our DIY mystery escape room guide shows how to build a full clue trail.
- Lunchbox notes. Send a short coded message for your child to crack at school.
- Spy club. Give siblings or friends a shared key and a team name.
- Crack the code. Older kids can try breaking a shift cipher without the key by testing each shift.
Code-breaking pairs well with mystery and detective stories. A live class on spies and detectives can introduce real history, like famous codebreakers, along with new puzzles to solve.
Frequently asked questions
What age can kids start making codes?
Many five- and six-year-olds enjoy the number code and reverse alphabet with help. Shift ciphers and pigpen suit kids who read comfortably.
Why didn't my invisible ink show up?
The paper may not be warm enough, or the writing may be too thin. Use more juice, larger letters and let an adult try a little more heat.
How can I make a shift cipher harder?
Change the key for each message, remove spaces between words, or combine two ciphers. Breaking those becomes a real puzzle.
Is it a code or a cipher?
Strictly, a cipher changes each letter and a code swaps whole words or phrases. For kids at home, either word is fine.
Ready for more mysteries?
If your child loves writing and cracking secret messages, live classes on spies and detectives offer new codes, puzzles and cases to solve with other kids.