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 translator

How 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:

ABCDEFGHIJKLMNOPQRSTUVWXYZ
The key: A–I in the first grid, J–R with a dot, S–V in the X, W–Z in the X with 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.

“TREASURE IN THE GARDEN” in pigpen

There are no symbols for digits or accented letters – write numbers as words and leave accents off.

All symbols at a glance

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.

ABCDEFGHIJKLMNOPQRSTUVWXYZ
Three-grid variant: no, one or two dots

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

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

  1. Pigpen cipher – Wikipedia, with variants and the Trinity Church gravestone.

Pigpen cipher translator – free, no sign-up.

Open the tool