Pigpen (Masonic) Cipher
Encipher text in Pigpen (the Masonic cipher), drawing all 26 symbols, with the full reference alphabet below.
Pigpen: an alphabet made of corners and dots
The pigpen cipher, also called the Masonic cipher, swaps each letter for a piece of a grid. The construction is systematic: two three-by-three grids and two X shapes give 26 positions, one per letter. The symbol is the outline of the cell the letter sits in — the top-left cell of the grid becomes an angle opening down and to the right, and so on. The second set repeats the shapes with a dot inside.
Type the text and the page draws the symbols, with the full alphabet just below for reference. The glyphs are vector drawings, so they scale without blurring and can be copied as images. Spaces separate words; punctuation and digits have no symbol in this cipher and are dropped, which is the traditional behaviour.
As a cipher it is weak for the same reason as any substitution: each letter always becomes the same drawing, and frequency survives intact. Its use today is different — it turns up in treasure hunts, board games, escape room puzzles and classroom activities, where the value lies precisely in looking intriguing while being easy to decipher with the table at hand.
Frequently asked questions
Why is it called the Masonic cipher?
Is there a single canonical version?
Can numbers be written?
Related Tools
Trithemius Cipher
Polyalphabetic cipher where letter n is shifted by n positions (similar to Vigenère with key ABCDEF…). Invented by Johannes Trithemius in the 16th century.
Playfair Cipher Step by Step
Encrypt/decrypt with Playfair showing the 5×5 matrix, letter pairs and the rule applied to each digram.
Polybius Square Cipher
Encrypt and decrypt messages with the Polybius square, which turns each letter into a pair of digits on a 5×5 grid (with I and J combined).
Beaufort Cipher
Enciphers letters with the Beaufort cipher, a reciprocal Vigenere variant where each output letter is key minus plaintext mod 26, so the key also decodes.
Frequency Analysis to Break Ciphers
Count letter, bigram and trigram frequencies in ciphertext and compare with Portuguese/English references.
Polybius Cipher
Encode text with the Polybius cipher (5x5 square, I/J merged). Each letter becomes a row/column digit pair. Useful for puzzles and classical cryptography.