The pigpen cipher – also called the Freemason’s cipher or Masonic cipher – swaps every letter for a little shape made from a tic-tac-toe grid and an X. It looks like a secret alphabet, but once you know the key you can read it in seconds.
Below you’ll find the full pigpen cipher key, a simple explanation of how it works, and 20 pigpen puzzles to decode, from single words to whole sentences. Answers are hidden under each set.
Pigpen Cipher Key

Once you’ve cracked the pigpen code, try the Atbash, Caesar and scytale cipher puzzles – or relax with a hard printable word search.
How the Pigpen Cipher Works
- Draw a tic-tac-toe grid (#) and write A to I in its nine boxes, left to right, row by row.
- Draw a second # grid and write J to R in it – but put a dot in every box.
- Draw an X and write S (top), T (left), U (right) and V (bottom) in its four spaces.
- Draw a second X with dots for W, X, Y and Z.
- To write a letter, draw only the lines around its box (plus the dot if it has one). For example, A is the top-left box, so it’s a shape like ⌟; E is the middle box, so it’s a full square.
Decoding is the same in reverse: look at the shape, find the box it matches, and check for a dot.
Pigpen Puzzles 1–5: Single Words

1. What does pigpen message 1 say?
Show answer
HELLO
2. What does pigpen message 2 say?
Show answer
SECRET
3. What does pigpen message 3 say?
Show answer
PIGPEN
4. What does pigpen message 4 say?
Show answer
TREASURE
5. What does pigpen message 5 say?
Show answer
MAGIC
Pigpen Puzzles 6–10: Short Messages

6. What does pigpen message 6 say?
Show answer
OPEN THE DOOR
7. What does pigpen message 7 say?
Show answer
FIND THE KEY
8. What does pigpen message 8 say?
Show answer
MEET AT SIX
9. What does pigpen message 9 say?
Show answer
LOOK UP
10. What does pigpen message 10 say?
Show answer
GOOD JOB
Pigpen Puzzles 11–15: Brain Twisters

11. What does pigpen message 11 say?
Show answer
BRAIN POWER
12. What does pigpen message 12 say?
Show answer
PUZZLE MASTER
13. What does pigpen message 13 say?
Show answer
THE CODE IS SAFE
14. What does pigpen message 14 say?
Show answer
HIDE AND SEEK
15. What does pigpen message 15 say?
Show answer
QUIZ TIME
Pigpen Puzzles 16–18: Tricky Letters

16. What does pigpen message 16 say?
Show answer
ZEBRA CROSSING
17. What does pigpen message 17 say?
Show answer
WIZARD OF OZ
18. What does pigpen message 18 say?
Show answer
JUMP OVER THE FOX
Pigpen Puzzles 19–20: Expert Level

19. What does pigpen message 19 say?
Show answer
KNOWLEDGE IS POWER
20. What does pigpen message 20 say?
Show answer
YOU CRACKED IT
A Short History of the Pigpen Cipher
Versions of the pigpen cipher go back hundreds of years. It became famous in the 1700s when Freemasons used it to keep their records private – which is why it’s often called the Freemason’s or Masonic cipher. During the American Civil War, prisoners are said to have used it to pass secret notes, and today you’ll find it on old gravestones, in escape rooms and in puzzle games.
It’s easy to break (every letter always has the same symbol), so it isn’t used for real secrets any more – but it’s a perfect first code for kids and a fun way to hide a message in a birthday card or treasure hunt.
More Codes and Puzzles
- 30 Cipher Puzzles: Atbash, Caesar & Scytale
- 10 Hard Word Search Puzzles (Printable)
- 100 Brain Teasers with Answers
- 110+ Rebus Puzzles with Answers
- 20 Logic Puzzles with Answers
- 50 Brain Teasers for Kids
- 25 Math Riddles with Answers
- Einstein’s Riddle & Zebra Puzzles
- 20 Mystery Puzzles with Answers
- Tap Code Translator & Polybius Square
- 50 Treasure Hunt Riddles (with Clue Cards)
- Cipher Decoder and Identifier (14 Ciphers)
Frequently Asked Questions
What is the pigpen cipher?
It’s a simple substitution cipher that replaces each letter with a shape taken from a tic-tac-toe grid or an X, with or without a dot.
Why is it called the Freemason’s cipher?
Freemasons used it in the 18th century to keep their records private, so it’s also known as the Freemason’s cipher or Masonic cipher.
How do you decode a pigpen cipher?
Draw the key (two # grids and two X’s, the second of each with dots), then match each symbol to the box with the same lines and dot.
Is the pigpen cipher hard to crack?
No – each letter always uses the same symbol, so it can be broken by frequency analysis. It’s best for fun, games and teaching kids about codes.