Pigpen Cipher — Complete Guide to the Masonic Cipher Alphabet
By Letters2NumbersConverter.com · May 13, 2026
The Pigpen cipher — also called the Masonic cipher or tic-tac-toe cipher — is one of the most visually distinctive secret codes ever devised. Instead of replacing letters with other letters or numbers, it replaces each letter with a geometric symbol derived from two simple grids. The result looks like alien hieroglyphs, yet anyone with the key can decode a message in minutes. This guide covers the complete Pigpen cipher alphabet, step-by-step encoding and decoding with a worked example, cipher variants, and practical tips for escape room designers. To identify an unknown cipher automatically, try our free Cipher Identifier.
What Is the Pigpen Cipher?
The Pigpen cipher is a geometric monoalphabetic substitution cipher. Each of the 26 letters is assigned a symbol that is the outline of the cell or region in which that letter sits in one of two reference grids. There are no numbers or letters in the output — only angular shapes — making it superficially hard to recognise as a cipher at all.
The cipher has existed in various forms since at least the 1530s, but it became famous through its adoption by Freemasonsin the 18th century. Masonic lodges used it to encode lodge records, minutes, and personal correspondence. Gravestones bearing Pigpen inscriptions can still be found today in older cemeteries across the United States and Europe. The cipher also appears in literature, most notably in Sir Arthur Conan Doyle's “The Adventure of the Dancing Men” (which uses a different symbol set) and Dan Brown's “The Lost Symbol.”
Despite its exotic appearance, the Pigpen cipher offers no cryptographic security by modern standards. Because each letter always maps to the same symbol, frequency analysis breaks it as easily as any other monoalphabetic substitution cipher. Its value is purely in obscurity and visual appeal — ideal for puzzles and games.
The Two Reference Grids
The Pigpen cipher is built from two grids. The first is a standard tic-tac-toe (noughts-and-crosses) grid containing 9 cells. The second is an X-shaped (diagonal cross) grid containing 4 regions. Letters A–I fill the tic-tac-toe grid without dots; letters J–R fill it again with a dot added to each symbol. Letters S–V fill the X grid without dots; W–Z fill it again with dots.
Grid 1 — Tic-Tac-Toe (A–R)
G | H | I
| |
----+-----+----
D | E | F
| |
----+-----+----
A | B | C
| |
(J–R = same grid + dot ·)Each letter's symbol = the lines surrounding its cell
Grid 2 — X Shape (S–Z)
T \ / S
X
V / \ U
(W–Z = same grid + dot ·)
S = bottom-right ∨
T = bottom-left ∨ (mirror)
U = right-facing >
V = left-facing <Each letter's symbol = the two lines of the X bordering its region
The key insight: the symbol for each letter is the outline of the segment that contains it. For the tic-tac-toe grid, that means a corner cell produces an L-shaped symbol (two lines), an edge cell produces a U-shaped symbol (three lines), and the centre cell produces a full square (four lines). For the X grid, each region is bounded by exactly two diagonal lines forming a V or chevron shape.
The Full Pigpen Cipher Alphabet
The table below shows every letter, which grid it comes from, whether a dot is present, and a description of the symbol. Use this as your Pigpen cipher decoder key.
| Letter | Grid | Dot? | Symbol Description |
|---|---|---|---|
| A | Tic-tac-toe | — | Bottom-right corner (└ shape) |
| B | Tic-tac-toe | — | Bottom edge — open top (⌐ + └ = U shape) |
| C | Tic-tac-toe | — | Bottom-left corner (┘ shape) |
| D | Tic-tac-toe | — | Right edge — open left (⊏ shape) |
| E | Tic-tac-toe | — | Centre — four sides (□ shape) |
| F | Tic-tac-toe | — | Left edge — open right (⊐ shape) |
| G | Tic-tac-toe | — | Top-right corner (┌ shape) |
| H | Tic-tac-toe | — | Top edge — open bottom (⌐ shape, Γ-like) |
| I | Tic-tac-toe | — | Top-left corner (┐ shape) |
| J | Tic-tac-toe | · | Bottom-right corner with dot |
| K | Tic-tac-toe | · | Bottom edge — U shape with dot |
| L | Tic-tac-toe | · | Bottom-left corner with dot |
| M | Tic-tac-toe | · | Right edge with dot |
| N | Tic-tac-toe | · | Centre square with dot |
| O | Tic-tac-toe | · | Left edge with dot |
| P | Tic-tac-toe | · | Top-right corner with dot |
| Q | Tic-tac-toe | · | Top edge with dot |
| R | Tic-tac-toe | · | Top-left corner with dot |
| S | X grid | — | Bottom-right V shape (∨) |
| T | X grid | — | Bottom-left V shape (mirrored ∨) |
| U | X grid | — | Right-pointing V shape (>) |
| V | X grid | — | Left-pointing V shape (<) |
| W | X grid | · | Bottom-right V shape with dot |
| X | X grid | · | Bottom-left V shape with dot |
| Y | X grid | · | Right-pointing V shape with dot |
| Z | X grid | · | Left-pointing V shape with dot |
Tic-Tac-Toe Grid Symbol Shapes (A–I)
The nine symbols for letters A–I correspond to the nine cells of the tic-tac-toe grid. The symbol is the boundary lines of that cell:
Cell positions and their boundary-line symbols:
G (top-left) H (top-center) I (top-right)
┌─ ─┬─ ─┐
│ │ │
D (mid-left) E (center) F (mid-right)
├─ ─┼─ ─┤
│ │ │
A (bot-left) B (bot-center) C (bot-right)
└─ ─┴─ ─┘
(nothing (nothing (nothing
below) below) below)
Reading the shapes:
A = └ (corner: bottom + right walls)
B = ⌐└ (U-shape: left + bottom + right walls)
C = ┘ (corner: bottom + left walls)
D = ⊏ (3 walls: top + bottom + right)
E = □ (all 4 walls — the square)
F = ⊐ (3 walls: top + bottom + left)
G = ┌ (corner: top + right walls)
H = Γ (3 walls: left + top + right — like ∩)
I = ┐ (corner: top + left walls)
J–R = same shapes as A–I but with a dot (·) insideX Grid Symbol Shapes (S–V, then W–Z with dot)
The X grid creates 4 regions — each bounded by 2 diagonal lines:
top
/\
left / \ right
/ \
/ cent \
X--------X
\ cent /
\ /
left \ / right
\/
bot
Regions and their V-shaped symbols:
S (bottom-right) → ∨ (opening faces up-right)
T (bottom-left) → ∨ (mirror: opening faces up-left)
U (right) → > (opening faces left)
V (left) → < (opening faces right)
W–Z = same as S–V respectively but with a dot (·) insideHow to Encode a Message with the Pigpen Cipher
Encoding is straightforward once you have the alphabet table memorised or in front of you:
- Write out your plaintext message in capital letters (spaces and punctuation are usually dropped or kept as-is).
- Locate each letter in the Pigpen alphabet table above.
- Draw (or write the description of) the corresponding symbol — the outline shape from the grid, plus a dot if the letter is in the J–R or W–Z range.
- Combine the symbols left to right to form the encoded message.
Worked Example — Encoding “SECRET”
| Step | Letter | Grid | Dot? | Symbol Shape |
|---|---|---|---|---|
| 1 | S | X grid | no | Bottom-right V (∨) |
| 2 | E | Tic-tac-toe | no | Centre square (□) |
| 3 | C | Tic-tac-toe | no | Bottom-left corner (┘) |
| 4 | R | Tic-tac-toe | · | Top-left corner with dot |
| 5 | E | Tic-tac-toe | no | Centre square (□) |
| 6 | T | X grid | no | Bottom-left V (mirrored ∨) |
To send the word SECRET, you would draw six symbols in sequence: a bottom-right V shape (S), a full square (E), a bottom-left corner angle (C), a top-left corner angle with a dot inside (R), another full square (E), and a bottom-left V shape (T). Anyone holding the Pigpen key can immediately reverse the process to recover the original word.
How to Decode a Pigpen Cipher Message
Decoding reverses the process:
- Identify the shape type — is it made of straight lines (tic-tac-toe grid) or diagonal lines (X grid)?
- Count the lines in the symbol — 2 lines means a corner cell; 3 lines means an edge cell; 4 lines means the centre cell of the tic-tac-toe grid; 2 diagonal lines means the X grid.
- Determine orientation — which direction do the lines open toward? This tells you which of the 9 tic-tac-toe cells (or 4 X regions) the letter occupies.
- Check for a dot — no dot means the first set (A–I or S–V); a dot means the second set (J–R or W–Z).
- Look up the letter in the alphabet table and write it down. Repeat for each symbol.
Quick Decode Shortcut
When decoding quickly, focus on two features: (1) how many sides the symbol has (2 = corner, 3 = edge, 4 = centre), and (2) which direction it opens (bottom-right, bottom, bottom-left, right, centre, left, top-right, top, top-left for the tic-tac-toe grid). Then dot or no dot cuts the alphabet in half. With practice, a trained eye can decode Pigpen at nearly reading speed.
Pigpen Cipher Variants
Rosicrucian Cipher (Rose Cross Cipher)
The Rosicrucian cipher uses only the tic-tac-toe grid but places twoletters in each of the 9 cells (covering all 18 letters) plus another grid for the remaining 8. A dot distinguishes the two letters in each cell. Some versions use a different arrangement of the alphabet in the grid. The result looks like Pigpen but decodes differently — making it a common source of confusion in puzzles. The Rosicrucian secret society, which inspired the cipher's name, flourished in the early 17th century.
Napoleon's Cipher
Napoleon's cipher(sometimes called the Emperor's cipher) is a variation attributed to use by Napoleon's army. It uses a similar tic-tac-toe grid but rearranges the letters so that common letters like E, T, and A occupy the most easily drawn symbols (corners and edges). This made field encoding faster. The exact layout varies by source — if you encounter a “Napoleon variant” in a puzzle, the puzzle creator should provide the specific key.
Custom Pigpen Variants
Because the Pigpen system is based on a simple geometric principle, puzzle designers frequently create custom variants by:
- Reordering the letters in the grid (using a keyword to scramble the alphabet first)
- Using different grid shapes (hexagonal, circular, or triangular)
- Adding extra symbols for numbers or punctuation
- Rotating the entire grid 90°, 180°, or 270° to change symbol orientations
If you encounter an unfamiliar symbol-based cipher, our Cipher Identifier can help you determine whether it is Pigpen, Rosicrucian, or another geometric cipher.
Pigpen Cipher in Escape Rooms and Puzzles
The Pigpen cipher is a staple of escape room design for good reason. Its symbols look like an alien script on first glance — creating a satisfying moment of confusion before the solve — but it is learnable in under five minutes once a player has the key. Here is how it typically appears:
- Physical props: symbols carved into a wooden block, embossed on a locket, or printed on an “ancient” map. The tic-tac-toe shapes look particularly convincing as architectural or alchemical engravings.
- Multi-step puzzles: the decoded Pigpen message reveals a combination, a location, or the next cipher to solve. Pairing Pigpen with a Caesar cipher or Atbash cipher creates satisfying two-step puzzles. Try our Caesar Cipher Decoder and Atbash Cipher Decoder for those steps.
- UV or hidden ink reveals: Pigpen symbols written in UV-reactive ink are invisible until a blacklight is shone on them — a memorable reveal moment.
- Geocaching: Pigpen is popular in geocache puzzle hides. Coordinates are encoded and the solver must find or already know the cipher key. See our guide on other classical ciphers for more geocaching cipher types.
- Embedded in artwork: symbols can be disguised as decorative borders, stained glass patterns, or tile work, requiring players to recognise the cipher before they can even start decoding.
For cryptogram-style puzzles where the cipher type is unknown, our Cryptogram Solver can assist once you have converted the symbols to letters.
Tips for Puzzle Solvers
| Situation | What to Do |
|---|---|
| Symbols are clearly Pigpen but message makes no sense | Try rotating the entire key grid 90° — the creator may have rotated the standard orientation |
| Some symbols look like Pigpen but others do not | Check for a Rosicrucian or custom variant; look for a key printed somewhere in the puzzle |
| Message is the right length for a word but letters seem off | Try applying a Caesar shift (try +3 or −3) or Atbash to the decoded letters |
| You cannot find a standard key grid nearby | The tic-tac-toe + X grid layout is standard; print or sketch the key from this article |
| Symbol has three or more dots | This is likely not standard Pigpen — it may be a Morse code hybrid or the puzzle creator's invention |
Pigpen Cipher vs. Other Classical Ciphers
| Feature | Pigpen | Caesar | Atbash |
|---|---|---|---|
| Output type | Geometric symbols | Letters | Letters |
| Key required? | Grid layout (fixed) | Shift number (1–25) | None (Z→A fixed) |
| Recognisable as cipher? | Not to untrained eye | Yes — it is still letters | Yes — still letters |
| Crack by frequency analysis? | Yes (once symbols→letters) | Yes — trivially | Yes — trivially |
| Escape room popularity | Very high | High | Medium |
| Historical origin | 16th century, Masonic use 18c | Roman military, Julius Caesar | Hebrew scribes, ~600 BCE |
Frequently Asked Questions
What is the Pigpen cipher?
The Pigpen cipher is a geometric monoalphabetic substitution cipher that encodes each letter as the outline of the grid section containing it. It uses a tic-tac-toe grid (letters A–R) and an X-shaped grid (letters S–Z), with dots distinguishing the second half of each set. It is also called the Masonic cipher or tic-tac-toe cipher.
How do I decode a Pigpen cipher message?
To decode Pigpen cipher text, match each symbol to its letter using the alphabet key. Straight-line symbols come from the tic-tac-toe grid (A–R); diagonal V-shapes come from the X grid (S–Z). Count the lines to identify the cell position, note the orientation to distinguish the specific cell, and check for a dot to determine whether you are in the first or second half of each grid's letter set.
What is the Masonic cipher?
The Masonic cipher is another name for the Pigpen cipher, used historically by Freemasons to encode lodge records and correspondence. It gained the “Masonic” name because of its widespread adoption by lodges across Europe and North America in the 18th and 19th centuries. The cipher predates the Freemasons — earlier versions appear in 16th-century manuscripts — but Masonic use made it famous.
What is the difference between the Pigpen cipher and the Rosicrucian cipher?
Both use tic-tac-toe grid outlines, but the Rosicrucian cipher places two letters per cell (using a dot to tell them apart), while the standard Pigpen cipher places one letter per cell across two different grids. The layouts differ, so a message encoded with one cannot be decoded using the other's key. When a puzzle gives no specific variant, assume standard Pigpen.
Is the Pigpen cipher secure?
No. Like all monoalphabetic substitution ciphers, Pigpen is vulnerable to frequency analysis — E, T, and A remain the most common symbols in English text regardless of whether they are letters or geometric shapes. A skilled cryptanalyst can break it in minutes given a message of even moderate length. Use it for puzzles and games, not for protecting sensitive information.
Where can I find a Pigpen cipher decoder tool?
The best approach for decoding Pigpen cipher is to use the alphabet table in this article to manually convert each symbol to a letter, then if needed apply a secondary cipher layer using our online tools. If you are not sure which cipher you are looking at, our Cipher Identifier can help narrow it down. For other cipher types that may accompany a Pigpen layer, try our Cryptogram Solver.
Explore More Cipher Tools and Guides
The Pigpen cipher is one entry in a rich world of classical cryptography. Explore these related tools and articles:
- Cipher Identifier — automatically detect which cipher was used
- Caesar Cipher Decoder — brute-force all 25 shifts instantly
- Atbash Cipher Decoder — mirror-alphabet substitution used in Hebrew scriptures
- Cryptogram Solver — solve monoalphabetic substitution ciphers with frequency hints
- Vigenère Cipher Decoder Guide — the polyalphabetic cipher that stumped cryptanalysts for 300 years