All articles
kidsciphereducationactivities

Cryptography for Kids: Fun Secret Code Activities

Fun secret codes and cipher activities for kids — Caesar cipher, Pig Latin, mirror writing, invisible ink, and more. Perfect for classrooms and rainy days.

April 20, 20268 min readBy SolveCipher Team

Secret codes for kids are one of the best ways to make learning feel like play. When children encode a message for a friend, they're practicing the alphabet, number patterns, logic, and problem-solving — all while feeling like a spy on a mission. These seven activities work for ages 7 and up, require no special materials, and can fill a rainy afternoon or an entire classroom unit.

Every activity below uses a real cipher technique — the same kinds used by spies, soldiers, and scientists throughout history. Kids aren't just playing pretend; they're doing actual cryptography.

Activity 1: The Caesar Cipher

The Caesar cipher is the perfect first code for kids. Pick a number (the "shift"), then move every letter forward by that many places in the alphabet.

How to play: Choose a shift of 3. Write the alphabet on one line, then write it again below, starting 3 letters later:

Normal:  A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Shifted: D E F G H I J K L M N O P Q R S T U V W X Y Z A B C

Now write a secret note by replacing each letter with its shifted version. "HELLO" becomes "KHOOR." Give the note and the shift number to a friend and let them decode it.

What kids learn: Pattern recognition, alphabet ordering, and the concept of a secret key.

Activity 2: The A1Z26 Number Code

Turn every letter into a number using its position in the alphabet: A=1, B=2, C=3 ... Z=26. This is the A1Z26 cipher, and it's wonderfully simple.

How to play: Write a message using only numbers separated by dashes:

S-E-C-R-E-T = 19-5-3-18-5-20

Challenge: Can your friend decode 8-5-12-12-15 without a chart? (It's HELLO.)

What kids learn: The alphabet as an ordered sequence, one-to-one correspondence between letters and numbers, and basic counting skills.

Activity 3: Pig Latin

Pig Latin isn't technically a cipher — it's a language game — but it's one of the most beloved secret codes among kids and a great entry point.

The rules:

  • If a word starts with a consonant, move the first consonant (or consonant cluster) to the end and add "ay." HELLO → ELLOHAY. SECRET → ECRETSAY.
  • If a word starts with a vowel, just add "way" or "yay" to the end. APPLE → APPLEWAY. ICE → ICEWAY.

How to play: Try having a full conversation in Pig Latin. Start slow with single words, then build up to sentences. It gets surprisingly fast with practice.

What kids learn: Consonants vs. vowels, syllable structure, and phonemic awareness — all while laughing.

Activity 4: Mirror Writing

Leonardo da Vinci famously wrote his notebooks in mirror script — text that reads normally only when held up to a mirror. Kids find this fascinating.

How to play: Write a message backward, right to left, with each letter reversed. Hold it up to a mirror and it reads normally. Some kids find it easier to write on thin paper held against a window, tracing the letters from behind.

Variation: Write normally but reverse the word order. "MEET AT THE PARK" becomes "PARK THE AT MEET." This is simpler but still requires the reader to think.

What kids learn: Spatial reasoning, letter orientation, and fine motor skills.

Activity 5: Morse Code Flashlight Messages

Morse code uses dots (short signals) and dashes (long signals) to represent letters. Kids can send Morse code with a flashlight — short flashes for dots, long flashes for dashes.

Start with SOS: Three short flashes, three long flashes, three short flashes. This is the universal distress signal and the easiest Morse pattern to remember.

Then learn these common letters:

E = .       (one short flash)
T = -       (one long flash)
A = .-      (short, long)
N = -.      (long, short)

With just E, T, A, and N, kids can spell simple words like TEN, ATE, and NEAT. Gradually add more letters using our Morse code chart.

What kids learn: Binary representation (two symbols can encode any letter), patience, and communication across distances.

Activity 6: Pigpen Cipher Drawing

The Pigpen cipher replaces letters with geometric symbols based on their position in a grid. It looks like alien writing and kids love drawing it.

The setup: Draw two tic-tac-toe grids and two X shapes. Place letters in each cell:

Grid 1:        Grid 2 (with dots):
A | B | C      J. | K. | L.
---------      -------------
D | E | F      M. | N. | O.
---------      -------------
G | H | I      P. | Q. | R.

X shape 1:     X shape 2 (with dots):
  S               W.
T   U            X.  Y.
  V               Z.

Each letter's symbol is the shape of the cell it sits in. A is an open right-angle (the corner piece of the grid), E is a box (the center cell), and so on.

How to play: Write a message in Pigpen symbols and challenge someone to decode it. Provide the grid as the "key."

What kids learn: Visual-spatial reasoning, coordinate systems, and the concept of a substitution cipher.

Activity 7: Make Your Own Substitution Cipher

This is the creative culmination — kids design their own secret alphabet from scratch.

How to play:

  1. Write the 26 letters of the alphabet in a column
  2. Next to each letter, draw a unique symbol, emoji-style icon, or assign a different letter
  3. Write the key on a card for your code partner
  4. Exchange secret messages

Encourage kids to make their symbols creative — stars, moons, arrows, spirals, animal shapes. The more personal the alphabet, the more invested they'll be.

What kids learn: The concept of a key-based substitution cipher, the importance of keeping the key secret, and creative design thinking.

Connecting to Math

Secret codes are math in disguise. Point out these connections to kids:

Patterns and rules: Every cipher follows a rule (shift by 3, replace A with 1, reverse the word). Recognizing and applying rules is foundational to algebra.

One-to-one functions: In a substitution cipher, each letter maps to exactly one symbol, and each symbol maps back to exactly one letter. This is the mathematical concept of a bijection — a concept they'll encounter formally in high school.

Modular arithmetic: When the Caesar cipher wraps Z back to A, that's modular arithmetic (mod 26). It's the same math behind clocks — after 12, we go back to 1.

Historical Spies and Codes

Kids love knowing that real spies used these exact techniques:

  • Julius Caesar used a shift-3 cipher to send military orders in 58 BC
  • Mary, Queen of Scots was convicted partly because her coded letters were cracked
  • The Navajo Code Talkers in WWII used the Navajo language as an unbreakable code
  • Alan Turing cracked the Enigma machine, helping end WWII

These stories show kids that cryptography isn't just a game — it shaped history.

Try Our Free Online Tools

All of the ciphers in these activities can be practiced with our free tools:

Frequently Asked Questions

What age is appropriate for learning secret codes?

Most kids can start with simple substitution ciphers (A1Z26, Caesar with small shifts) around age 7. Pig Latin and mirror writing work even younger. More complex ciphers like Pigpen and Morse code work well from age 9 and up.

Can I use these activities in a classroom?

Absolutely. Secret codes align with language arts (alphabet, spelling, vocabulary), math (patterns, number systems), and social studies (history of espionage and communication). They also make excellent team-building exercises.

Which cipher is best for passing notes?

The Caesar cipher is the fastest to use once memorized. For something more visual and fun, the Pigpen cipher looks mysterious and is easy to decode with the key grid.

How do I make it harder for kids who master the basics?

Layer two ciphers together — for example, encode with A1Z26 first, then apply a Caesar shift to the numbers. Or try the Vigenere cipher, which uses a keyword to apply different shifts to different letters.