Ciphers & codes
Pigpen cipher – key and alphabet
The pigpen cipher is the favourite secret code for treasure hunts: every letter becomes a small symbol of lines and dots. Here you’ll find the key to copy, every symbol, the three-grid variant – and a translator that prints puzzle sheets.
Type your text – the symbols appear instantly. Print as a puzzle sheet or save as an image. Free, no sign-up.
Open the pigpen translatorHow the pigpen cipher works
Draw two tic-tac-toe grids and two large X shapes. Write the alphabet into the cells – in the second grid and the second X, each cell also gets a dot:
To encrypt, replace each letter with the shape of its cell – the lines around it, plus the dot if there is one. A is the bottom-right corner (┘), E the closed box in the middle, S a V-shaped angle.
There are no symbols for digits or accented letters – write numbers as words and leave accents off.
All symbols at a glance
- 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
Type a message, print the symbols, start the treasure hunt.
The three-grid variant with dots
Some puzzle books and schoolbooks use a version without any X: three grids, the first without a dot (A–I), the second with one dot (J–R), the third with two dots (S–Z). It is easier to draw and remember. The last cell stays empty.
- 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
Important for puzzles: sender and recipient must use the same variant. In the tool you choose it under “Variant”.
Tips for treasure hunts and parties
- Hide the key: hide the key (the grids above) as a station of its own – only whoever finds it can read the clues.
- Short clues: for kids under 10, 2–4 words per note, e.g. “UNDER THE BENCH”.
- Print big: the tool prints a puzzle sheet with large symbols and, if you like, the key table underneath. Saved as PNG, the ciphertext also works on invitations.
- Let them join in: kids can write their own messages with chalk or pens – the symbols are only lines and dots.
- Decode on a phone: under “Decrypt”, tap the symbols from the note on an on-screen keypad – the text appears instantly.
Where the name comes from
Freemasons used the cipher in the 18th century for records and symbols, which is why it is also called the Freemason’s cipher. “Pigpen” refers to the grids, where the letters sit like pigs in their pens. A famous example is the gravestone of James Leeson (died 1794) in Trinity Church cemetery in New York, whose inscription is carved in this cipher. Rosicrucians and merchants used similar signs even earlier.
Just for fun: the pigpen cipher is a simple letter substitution and can be solved with frequency analysis like any other. For real secrets, use “AES-256 with password” in the tool.
Write and read pigpen online
Both variants, puzzle sheet with key table, PNG export and a symbol keypad for decoding. Runs only in your browser.
FAQ
How does the pigpen cipher work?
The letters sit in two grids and two X shapes, each once without and once with a dot. Each letter is replaced by the lines of its cell, plus the dot.
Is there a variant without the X shapes?
Yes: three grids with no, one or two dots (A–I, J–R, S–Z). It is easier to draw. Sender and recipient must use the same variant.
How do I decode a pigpen message?
Find each symbol in the key: which cell has the same lines and dots? In the tool you can also tap the symbols on a keypad and get the plaintext.
Can I print the pigpen cipher?
Yes. The tool prints a puzzle sheet with the symbols and, if you like, the key table, or saves the message as a PNG image.
Why is it called pigpen?
The letters sit in the grids like pigs in their pens. It is also known as the Freemason’s cipher, because Freemasons used it in the 18th century.
Sources
- Pigpen cipher – Wikipedia, with variants and the Trinity Church gravestone.