Pigpen Cipher
PigPen Decoder
PigPen Encoder
Answers to Questions (FAQ)
What is the Pigpen cipher? (Definition)
The Pigpen cipher, also known as the Freemason cipher or Masonic alphabet, is a substitution system historically associated with Freemasonry.
It replaces letters of the alphabet with geometric symbols based on two 3 Γ 3 grids and two X-shaped arrangements. In the classic layout, dots distinguish some letters, allowing all 26 letters of the alphabet to be represented by 26 distinct symbols.
How to encode a message with the Pigpen cipher?
To encode a message with the Pigpen cipher, each letter of the alphabet is replaced with its corresponding symbol according to the selected key.
The symbols are constructed from two 3 Γ 3 grids and two X-shaped arrangements. Dots distinguish some letters.
The Pigpen correspondence/lookup table is therefore:
| 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 | ![]() | ||||
| dCode.fr | |||||||||||||
In the standard version, digits have no dedicated symbols.
Multiple variants exist for constructing the alphabet, and each changes the associations between symbols and letters (see below).
How to decrypt the Pigpen cipher?
How to recognize Pigpen ciphertext?
The ciphertext consists of angular geometric symbols made of right-angle segments (corners). Some symbols contain a dot: in the classic layout, 13 of the 26 symbols have a dot, representing 50% of the alphabet.
The glyphs have an angular appearance and may resemble a maze.
In the classic key, the 26 letters of the alphabet correspond to 26 distinct symbols.
References to pigs, pens, grids or farms may provide contextual clues.
The Pigpen cipher appears in video game puzzles, including Call of Duty: Black Ops 7 (Zombies mode) and the Roblox experience Broken Clocks.
The name may evoke the character Pig-Pen from Charles M. Schulz's Peanuts comic strip.
Confusion between Freemasonry and the Illuminati sometimes appears in popular culture. The two refer to distinct groups.
The Eye of Providence (all-seeing eye) is associated with Freemasonry in some contexts. This symbol is not exclusive to Freemasonry.
What variants of the Freemason Pigpen cipher exist?
Several variants exist in the association between symbols and letters. The following variants are listed by dCode:
| #0 | ABCDEFGHIJKLMNOPQRSTUVWXYZ (Classic layout: grids β, ββ’, then X-shaped arrangements β, ββ’) |
| #1 | ABCDEFGHIJKLMNOPQRSTVUWXZY (Variant in which the order of filling the X-shaped arrangements is modified by rotation β²) |
| #2 | ABCDEFGHINOPQRSTUVJKLMWXYZ (β, then β, then ββ’, then ββ’) |
| #3 | NOPQRSTUVWXYZABCDEFGHIJKLM (ββ’, ββ’, β, β) |
| #4 | IJKLMNOPQRSTUVWXYZABCDEFGH (β, ββ’, β, ββ’) |
| #5 | ACEGIKMOQBDFHJLNPRSUWYTVXZ (Variant alternating β and ββ’, then β and ββ’, called Sandi Kotak in Indonesia) |
| #6 | ACEGIKMOQBDFHJLNPRSUYWTVZX (Variant of #5, with the filling order of the X-shaped arrangements rotated ββ²) |
| #7 | ABCDEFGHILMNOPRSTV-------- (Version attributed to Heinrich Cornelius Agrippa von Nettesheim) |
| #8 | BDFHJLNPRACEGIKMOQT-V-S-U- (Version attributed to La Buse) |
The Templar cipher, Rosicrucian cipher, tic-tac-toe cipher and Dada Urka cipher use similar geometric symbols.
Why was the Pigpen cipher created?
Associated with Freemasonry, this cipher made written correspondence less readable to people who did not know the key.
It provided limited privacy and is not secure by modern cryptographic standards. Like any monoalphabetic substitution cipher, it is vulnerable to frequency analysis and other cryptanalytic methods.
Why is the Pigpen cipher called Pigpen?
The English word Pigpen means a pig enclosure or pig pen. The name refers to the appearance of the grids used to construct the symbols. Dots distinguish certain letters and do not necessarily represent pigs.
When was the Pigpen cipher invented?
The exact date when the Pigpen cipher originated has not been established with certainty.
Its use by Freemasons is reported in the 17th and 18th centuries, but these accounts do not establish its precise invention date. Several variants exist, making it difficult to attribute a single origin to the cipher.
About Pigpen Cipher
π Pigpen Cipher
Tool to decrypt/encrypt the Masonic alphabet. The Freemasons' Pig Pen cipher (Pigpen) is explained with the substitution alphabet using geometric symbols, grids, crosses, and dots for secret writing.
Author: dCode.fr
Tag(s) : Symbol Substitution
π Similar pages
π Keywords
freemason,masonic,pig,pen,pigpen,grid,dot,corner,all,seeing,eye,alphabet
ποΈ Source code
dCode retains ownership of the "Pigpen Cipher" source code. Any algorithm for the "Pigpen Cipher" algorithm, applet or snippet or script (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or any "Pigpen Cipher" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) or any database download or API access for "Pigpen Cipher" or any other element are not public (except explicit open source licence). Same with the download for offline use on PC, mobile, tablet, iPhone or Android app.
Reminder: dCode is an educational and teaching resource, accessible online for free and for everyone.
β Cite dCode β
The content of the page "Pigpen Cipher" and its results may be freely copied and reused, including for commercial purposes, provided that dCode.fr is cited as the source (Creative Commons CC-BY free distribution license).
Exporting the results is free and can be done simply by clicking on the export icons β€ (.csv or .txt format) or β§ (copy and paste).
To cite dCode.fr on another website, use the link:
In a scientific article or book, the recommended bibliographic citation is: Pigpen Cipher on dCode.fr [online website], retrieved on 2026-12-01,
π Support dCode
dCode and more
π‘ Need Help ?
Please, check our dCode Discord community for help requests!
NB: for encrypted messages, test our automatic cipher identifier!
dCode
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)