Pigpen Cipher Decoder and Translator
Type a message to see it in pigpen symbols, or tap the symbols you see on paper to decode them. The full key is below.
Encode: turn text into pigpen symbols
Your message in pigpen:
Decode: click the symbols you see
Find each symbol of the coded message on the keypad and click it, left to right. Use Space between words.
Example symbols:
Pigpen Cipher
Name: ____________________ Date: ______________
Key chart (also called the Freemason's cipher): A–I in the grid, J–R in the grid with dots, S–V in the X, W–Z in the X with dots.
Message:
Made with Crossword Print · crosswordprint.com/pigpen-cipher/
The Pigpen Cipher Decoder and Translator is a free, browser-based pigpen cipher encoder and decoder for the pigpen cipher, also called the pigpen cypher, Freemason’s cipher or masonic cipher. Type a message and it appears as pigpen symbols. Click symbols on a keypad to decode them. The tool runs entirely in your browser, needs no sign-up, and does not send anything you type to a server. You can also view the full pigpen alphabet key, download your message as a PNG or SVG file, or print the message together with its key. It suits secret notes, escape rooms, classroom code activities and geocaches.

How to use the Pigpen Cipher
To encode a message:
- Type your message in the Your message box. Symbols appear as you type and wrap to the width of the screen.
- Choose a size from Symbol size: Small, Medium (the default), Large or Extra large.
- Tick Show the letter under each symbol if you want the letters printed under the drawings, for example when teaching the cipher.
- To save the result, set Symbols per line (downloads) (3 to 60, default 12), then click Download PNG or Download SVG. The files are named pigpen-message and have a white background. You need at least one letter before downloading.
To decode a message:
- Find the keypad with all 26 symbols. Each symbol has its letter printed under it.
- Click each symbol you see on paper or in a picture. The letters build up in the Decoded text box, which you can also edit.
- Click Space for word gaps, Backspace to undo a mistake, or Clear to start again.
- Click Copy Decoded Text when you are finished.
Click Try an Example to load a working example. The decoder example shows the symbols for LODGE for you to click. To print the message with the full key chart, click Print Message & Key. Your settings are remembered in your browser for next time.
The pigpen symbols you download or print are free to use commercially too, for example on Etsy printables, in KDP puzzle books or on print-on-demand products.
What is the pigpen cipher?
The pigpen cipher is a simple substitution cipher. Each letter is replaced by a symbol taken from the lines around that letter’s position in a grid. Freemasons used it in the 18th century, and it is still popular today with children, escape rooms and geocaching.
How does the pigpen cipher work?
The key is the grid drawing, and each letter always has the same symbol. The tool uses the common modern layout. Letters A to I sit in a plain tic-tac-toe grid, read left to right and top to bottom. Letters J to R use the same grid with a dot in each cell. Letters S to V use a plain X, with S at the top, T on the left, U on the right and V at the bottom. Letters W to Z use an X with dots.
The symbol for each letter is the set of grid lines that surround its cell. A is the top-left cell, so it is drawn with lines on its right and bottom sides. E is the centre cell, so its symbol is a closed square. J is the same shape as A with a dot added. Other versions of the cipher arrange the letters differently, so check the key before you decode a message from another source.
Because the key is so small, you can draw it from memory. Draw two tic-tac-toe grids and two X shapes, then add dots to the second grid and the second X.
How to decode a pigpen cipher from a picture
To decode a pigpen message from a picture, match each symbol against the key. Check whether it has a dot, then check which sides of the grid are drawn. Write down the letter that matches. The tool cannot read photos, so you click the matching symbols on the keypad instead, and the letters appear in the Decoded text box as you go. A square with a dot in the middle, for example, is N: the centre cell of the dotted grid.
Why is it called the freemasons cipher?
It is called the Freemason’s cipher or masonic cipher because Freemasons used it in the 18th century. The name comes from that history. It is one of several names for the same cipher, and the pigpen cypher spelling is also common.
Is the pigpen cipher secure?
No. The pigpen cipher gives no real security. Once someone knows the grid, every message can be read. Like any substitution cipher, it can also be broken by letter frequency, since common letters such as E and T appear often in English text. Use it for puzzles, games and fun codes, not for private information.
Can I print the pigpen cipher key?
Yes. Click Print Message & Key to print the full key chart, which shows the four groups with their letters, along with your message in symbols.
Frequently asked questions
What is the pigpen cypher?
The pigpen cypher is another spelling of the pigpen cipher. It replaces each letter with a symbol drawn from the lines of a grid. The word cypher is used in the same way as cipher.
Is the Pigpen Cipher tool free?
Yes. It is free to use, runs in your browser, and does not require an account.
Does the tool send my message anywhere?
No. The tool runs entirely in your browser, and nothing you type is sent to a server.
Can the tool read a photo of a pigpen message?
No. The tool cannot read photos. Look at the symbols in the picture and click the matching ones on the keypad.
Why do some symbols have dots?
The dots separate the alphabet into groups. Letters J to R use the tic-tac-toe grid with dots, and letters W to Z use the X with dots. The dot is the only difference between A and J, for example.
Are numbers and punctuation converted into symbols?
No. Digits and punctuation stay as normal characters. Spaces become gaps, and line breaks are kept.
Can I use the decoder for a pigpen message on paper?
Yes. Look at each symbol on the paper and click the matching one on the keypad. The letters appear in the Decoded text box.
Can I use the pigpen cipher symbols on Etsy, KDP or print-on-demand products?
Yes. The messages, the key chart and the PNG or SVG files you make are royalty-free for personal, classroom and commercial use, including Etsy printables, KDP books, Teachers Pay Teachers and print-on-demand items such as shirts and mugs. No credit is required, and the only limit is copying the tool itself to run a competing service.
Related tools
- Atbash Cipher: use it to try another simple substitution cipher where each letter is swapped with its reverse in the alphabet.
- Caesar Cipher: use it when you want to shift each letter by a fixed number of places.
- Polybius Square: use it to encode letters as pairs of coordinates in a square grid.
- Morse Code Translator: use it to turn letters into dots and dashes.
- Cipher Identifier: use it when you have a coded message and want to find out which cipher was used.
- Letter to Number Converter: use it to replace each letter with its position in the alphabet.
- Cryptogram Maker: use it to make your own substitution puzzle from a sentence.
- Cryptograms: use it to practise solving substitution puzzles.
About the pigpen cipher
The pigpen cipher (alternatively referred to as the masonic cipher, Freemason's cipher, Rosicrucian cipher, Napoleon cipher, and tic-tac-toe cipher) is a geometric simple substitution cipher, which exchanges letters for symbols which are fragments of a grid. The example key shows one way the letters can be assigned to the grid.
Insecurity
The Pigpen cipher offers little cryptographic security. It differentiates itself from other simple monoalphabetic substitution ciphers solely by its use of symbols rather than letters, the use of which fails to assist in curbing cryptanalysis. Additionally, the prominence and recognizability of the Pigpen leads to it being arguably worthless from a security standpoint. Knowledge of Pigpen is so ubiquitous that an interceptor might not need to actually break this cipher at all, but merely decipher it, in the same way that the intended recipient would.
Due to Pigpen's simplicity, it is very often included in children's books on ciphers and secret writing.
History
The cipher is believed to be an ancient cipher and is said to have originated with the Hebrew rabbis. Thompson writes that, “there is evidence that suggests that the Knights Templar utilized a pig-pen cipher” during the Christian Crusades.
Parrangan & Parrangan write that it was used by an individual, who may have been a Mason, “in the 16th century to save his personal notes.”
In 1531 Cornelius Agrippa described an early form of the Rosicrucian cipher, which he attributes to an existing Jewish Kabbalistic tradition. This system, called "The Kabbalah of the Nine Chambers" by later authors, used the Hebrew alphabet rather than the Latin alphabet, and was used for religious symbolism rather than for any apparent cryptological purpose.
On the 7th July 1730, a French pirate named Olivier Levasseur threw out a scrap of paper written in the pigpen cipher, allegedly containing the whereabouts of his treasure which was never found but is speculated to be located in the Seychelles. The exact configuration of the cipher has also not been determined, an example of using different letters in different sections to further complicate the cipher from its standard configuration.
Variations of this cipher were used by both the Rosicrucian brotherhood and the Freemasons, though the latter used the pigpen cipher so often that the system is frequently called the Freemason's cipher. Hysin claims it was invented by Freemasons. They began using it in the early 18th century to keep their records of history and rites private, and for correspondence between lodge leaders. Tombstones of Freemasons can also be found which use the system as part of the engravings. One of the earliest stones in Trinity Church Cemetery in New York City, which opened in 1697, contains a cipher of this type which deciphers to "Remember death" (cf. "memento mori").
Text adapted from the Wikipedia article “Pigpen cipher” (revision 1359292056, 2026-06-14), authors, licensed under CC BY-SA 4.0. Shortened: some sections and paragraphs were left out, and reference markers, images and templates were removed; wording is otherwise unchanged. This text remains available under the same licence.