Pigpen Cipher Decoder

By Naomi Bruwer | Last edited Jun 15, 2026

Use our Pigpen Cipher Decoder to decrypt the cipher or encrypt English text!

Solve / Decode Text !

Encrypt / Encode Text !

Plain ABCDEFGHIJKLMNOPQRSTUVWXYZ
Cipher ABCDEFGHIJKLMNOPQRSTUVWXYZ

The Pigpen cipher is a geometric monoalphabetic substitution cipher that replaces each letter of the alphabet with a symbol drawn from one of two grid patterns: a tic-tac-toe grid and an X-shaped grid, each used twice (once plain, once with a dot inside). The result is an alphabet of 26 distinctive geometric symbols that's easy to memorise, quick to write by hand, and almost universally recognisable to anyone who's ever encountered it.

This tool encodes and decodes Pigpen ciphers using the standard 4-grid alphabet. Below the tool you'll find a working explanation of the 4-grid mechanic, the cipher's history (which traces back to at least the 16th century and includes Freemasonry, Confederate Civil War field communications, and Masonic gravestones still standing today), a section on the extended Pigpen-with-numbers variant, and a discussion of the cipher's appearances in literature and modern video games.

The cipher goes by several names: Pigpen Cipher, Masonic Cipher, Freemason's Cipher, Rosicrucian Cipher, and Tic-Tac-Toe Cipher all refer to the same system. The "pigpen" nickname comes from the way each letter appears to sit inside its own little geometric pen.

How it works

How to Use the Pigpen Cipher Tool

To decode: tap the Pigpen symbols on the on-screen keyboard in the order they appear in your ciphertext. The decoded plaintext appears in the result field as you go. Use Space between words and Delete to correct mistakes.

To encode: type your plaintext into the encoding field and select Encode Text. The tool returns your message rendered in Pigpen symbols, ready to copy or screenshot.

How the Pigpen Cipher Works

The Pigpen cipher uses two types of grids, and each of them has two variants. These grids are typically drawn in a tic-tac-toe (or hash) pattern and a diagonal cross (or X) pattern. Here's how the alphabet is organized within these grids:

First Grid (Tic-Tac-Toe Pattern)

The first nine letters of the alphabet (A–I) are placed in the sections of a tic-tac-toe grid. Each letter is represented by the shape of the section it occupies.

For example, the letter "C" is in the top right section, so its symbol is an "L" shape. "E" is in the centre, so it's represented by a square or box.

Second Grid (Tic-Tac-Toe Pattern with dots)

The second nine letters of the alphabet (J–R) are placed in the sections of a tic-tac-toe grid with dots. The grid follows the same logic as the first one but uses dots for distinction.

Third Grid (X-shaped grid)

The third grid has only four letters (S–V) that are positioned inside the cross.

For example, the letter "T" will be represented with the ">" symbol, and the letter "U" with the "<" symbol.

Fourth Grid (X-shaped grid with dots)

The fourth grid has only four letters (W–Z) that are positioned inside the cross with dots. The grid follows the same logic as the third one but uses dots for distinction.

Where Pigpen sits in the wider cipher family

Pigpen is a monoalphabetic substitution cipher. Each plaintext letter always maps to the same ciphertext symbol, with no shift, key, or variation. That puts it in the same family as the Caesar Cipher (which substitutes by shifting the alphabet) and the Atbash Cipher (which reverses the alphabet). What sets Pigpen apart is that its "ciphertext" is geometric symbols rather than letters — so it's a visual substitution rather than an alphabetic one. The cipher is often called the geometrical code for exactly this reason.

Because Pigpen is monoalphabetic and has a fixed alphabet, it's relatively easy to break by letter-frequency analysis once you have a moderate amount of ciphertext. Far easier than a polyalphabetic cipher like the Vigenère Cipher, which uses multiple substitution alphabets in sequence.

History of the Pigpen Cipher

The Pigpen cipher (also known as the Masonic Cipher, Freemason's Cipher, Rosicrucian Cipher, or Tic-Tac-Toe Cipher) has a long history rooted in simplicity and secrecy. Despite its appearance as a modern code, the Pigpen cipher dates back several centuries and has been used by various groups for secret communication.

Early origins

The cipher's grid-based geometric design has clear precedents in Renaissance occult and cryptographic literature. The earliest documented cipher in the same geometric-grid family appears in Henry Cornelius Agrippa's De Occulta Philosophia (Book 3, published 1531) — a foundational Renaissance text that included a substitution alphabet built on similar grid principles. Whether the modern Pigpen cipher descends directly from Agrippa's design or evolved independently from the broader Renaissance substitution-cipher tradition is debated, but Agrippa's work is the standard primary-source reference point for historians tracing the cipher's lineage.

Through the 16th and 17th centuries, geometric substitution ciphers of this type appeared in various forms across European occult, alchemical, and esoteric writings. These were often associated with Rosicrucian and proto-Masonic circles that valued symbolic and cryptographic secrecy as part of their practice.

Association with Freemasonry

The Pigpen cipher is most famously associated with the Freemasons, the fraternal organization that emerged in the late 16th to early 17th century. The Freemasons adopted the cipher for keeping their records, rituals, and correspondence confidential. Its simplicity, and the ease with which the 26 symbols could be memorised, made it an ideal tool for a secretive fraternity. Albert Mackey's Encyclopedia of Freemasonry (1828, with multiple later editions) is the dogmatic historical reference for Masonic cipher use; he documents the cipher under several of its alternate names.

Freemasons used the cipher in documents, lodge inscriptions, ceremonial objects, and, most strikingly, on gravestones. Masonic gravestones carved with Pigpen ciphertext still survive today, particularly in 18th- and 19th-century cemeteries across Britain, North America, and continental Europe. The association with Freemasonry is so strong that the cipher is sometimes referred to as the "Freemason's Cipher". We offer a free printable Pigpen Cipher Key PDF showing the full 4-grid alphabet reference and a Pigpen Cipher Worksheet PDF with practice messages. Both assets are free to use in classrooms, homeschool settings, scouting groups, and self-study.

Use during the American Civil War

The cipher's best-documented military use was during the American Civil War, when Confederate soldiers used Pigpen for field communications. Whilst the Confederate Cipher Disk actually resembled a Vigenère-style polyalphabetic device and was the official Confederate cipher system, Pigpen still appears repeatedly in surviving Confederate correspondence and is well-attested in 19th-century cryptography accounts.

Some sources also claim that members of the Continental Army used the Pigpen cipher during the American Revolutionary War. This earlier use is less well-documented than the Confederate Civil War use, and the historical evidence is limited. So treat it as a possibility rather than an established fact.

19th- and 20th-century revival

In the 19th and 20th centuries, the Pigpen cipher appeared in popular publications about secret codes and ciphers, contributing to its standing as a recreational puzzle. It became a favourite among scouts, students, and puzzle enthusiasts for creating and deciphering coded messages.

Today, the Pigpen cipher is regularly taught in classrooms, used in puzzle games, escape rooms, and treasure hunts, and is one of the most universally recognised classical ciphers in popular culture.

Pigpen with Numbers: the Extended Variant

The standard Pigpen alphabet covers only the 26 letters A–Z, which means messages containing digits can't be encoded directly. Several extended variants address this by adding a fifth grid for the numerals 0–9.

The most common approach uses an additional grid (sometimes a smaller tic-tac-toe pattern, sometimes a different geometric shape) with the ten digits placed in its cells. Different sources use different layouts, so there's no single "official" Pigpen-with-numbers system: the extended variant is a family of conventions rather than a single standardised one. When using Pigpen with numbers in a puzzle or activity, it's important to share the specific grid layout you're using along with the message, otherwise the recipient won't know where the digit symbols sit.

If you need to encode numbers and you're not committed to staying purely in Pigpen, a common alternative is to spell the digits out as English words ("twenty-five" rather than "25") and encode them with the standard Pigpen alphabet. That keeps the message in pure 4-grid Pigpen at the cost of being a bit more verbose.

Pigpen in Pop Culture

Pigpen in literature: Edgar Allan Poe

The American writer Edgar Allan Poe played a major role in popularising substitution-cipher cryptanalysis as a literary subject. His 1843 short story The Gold-Bug turns on the protagonist's solving of a substitution cipher hidden on a piece of parchment, and includes a detailed walkthrough of the cryptanalytic process using letter-frequency analysis. The cipher in The Gold-Bug isn't Pigpen specifically — it's a custom substitution alphabet of Poe's own invention — but it belongs to the same monoalphabetic-substitution family. The story is a foundational text for the popular fascination with classical ciphers (Pigpen included) that flourished through the 19th and 20th centuries. Poe also wrote a non-fiction essay, A Few Words on Secret Writing (1841), that explored cipher cryptanalysis directly.

Pigpen on Masonic gravestones

Some of the most striking surviving examples of Pigpen cipher use are Masonic gravestones carved with Pigpen ciphertext as memorial inscriptions. These are found particularly in 18th- and 19th-century cemeteries in Britain, North America, and continental Europe. Many of these are still legible to anyone who knows the cipher (which is, deliberately, very few people). The custom of carving Masonic messages in Pigpen reflects the cipher's deep historical association with the fraternity, and they remain one of the few examples of a classical cipher with surviving physical artefacts on public display centuries after creation.

18th-century Masonic gravestone of Thomas Brierley (died 1785) inscribed with Pigpen cipher text alongside Masonic symbols
The gravestone of Thomas Brierley (d. 1785), featuring Pigpen ciphertext alongside traditional Masonic iconography — including the square and compasses, the all-seeing eye, and the sun and moon. One of the surviving physical examples of the cipher's use by 18th-century Freemasons.
Image courtesy of Arch MD Mag. Used with permission.

Pigpen in modern video games

The Pigpen cipher appears in modern video games as a puzzle device, particularly in titles that reward players for engaging with in-world cryptography. The two most prominent examples are Assassin's Creed II (2009) and Call of Duty: Black Ops 7 (2025).

In Assassin's Creed II, Pigpen messages are hidden in "The Truth," a sequence of 20 glyph puzzles scattered across the game's Renaissance Italy. They were left behind in the Animus by the doomed Subject 16, Clay Kaczmarek, as a cryptic warning to the next person hooked into the machine. Decoding the glyphs unlocks a hidden cinematic, and one Pigpen message on Franklin D. Roosevelt's blackboard reads "The Masons brought it across the sea. George Washington passed it on," — a fan-favourite nod to the cipher's real Masonic history.

In Black Ops 7's Zombies map Ashes of the Damned, the Pigpen cipher turns up on a chalkboard in Yuri's Lab. Players have to gather six serum ingredients (Horde Chunks, Ravager Eyes, a Mysterious Limb and others), then let smoke reveal three symbol sets above the table. Decode them and interact with the matching items in the correct order, and you're prompted to add blood. Get it wrong and the vial turns black, forcing you to wait until the next round.

If you've landed on this page looking to decode a Pigpen message from one of these games, the tool above handles standard Pigpen. Tap the symbols on the keyboard and you'll have the plaintext immediately.

Frequently Asked Questions

Q: What is the Pigpen cipher? A: The Pigpen cipher is a geometric monoalphabetic substitution cipher — each letter of the English alphabet is replaced by a distinctive symbol. The 26 symbols are built using a tic-tac-toe grid and an X-shaped grid, each used twice: once plain, once with a dot inside. The result is an alphabet of 26 symbols that's easy to memorise, quick to write by hand, and visually distinctive.

Q: Why is it called the Pigpen cipher? A: The name comes from the way each letter appears to sit inside its own little geometric "pen" formed by the grid lines, like a pig in a pigpen. The metaphor is purely visual; the cipher has no actual association with pigs or farming. The name is informal and modern; the cipher itself is far older than the "Pigpen" label, which is why the same cipher has accumulated several alternate names over the centuries.

Q: Is the Pigpen cipher the same as the Masonic, Freemason's, Tic-Tac-Toe, or Rosicrucian cipher? A: Yes, they are all the same cipher, with different names. The cipher has accumulated five common names over its history: Pigpen Cipher, Masonic Cipher, Freemason's Cipher, Rosicrucian Cipher, and Tic-Tac-Toe Cipher. All five names refer to the same 4-grid substitution alphabet.

Q: Who invented the Pigpen cipher? A: The exact origin is unclear, but the earliest documented cipher in the same geometric-grid family appears in Henry Cornelius Agrippa's De Occulta Philosophia (Book 3, published 1531). By the 17th century, geometric ciphers of this type had been widely adopted by the Freemasons.

Q: How does the Pigpen cipher work? A: The Pigpen cipher uses four grids to encode the 26 letters of the alphabet. The first two grids are tic-tac-toe shaped (one plain, one with dots), covering A–R. The last two grids are X-shaped (one plain, one with dots), covering S–Z. Each letter is encoded as the shape of the grid section that contains it, plus a dot if it's in the dotted variant.

Q: Did the Freemasons really use the Pigpen cipher? A: Yes, extensively, and with surviving physical evidence. The Freemasons used the cipher for keeping records, rituals, and correspondence confidential from at least the 17th century onward. Albert Mackey's Encyclopedia of Freemasonry (1828) is the canonical reference. Some of the most striking surviving examples are Masonic gravestones from 18th- and 19th-century cemeteries, carved with Pigpen ciphertext as memorial inscriptions.

Q: Did Edgar Allan Poe use the Pigpen cipher? A: Not specifically, but he popularised the broader genre. Poe's 1843 short story The Gold-Bug is one of the founding texts of cipher-cryptanalysis fiction. The cipher in The Gold-Bug isn't Pigpen, but it belongs to the same monoalphabetic-substitution family.

Q: Did the Zodiac Killer use the Pigpen cipher? A: No. The Zodiac Killer's famous Z408 (1969) and Z340 (1969) ciphers used custom substitution alphabets, but they were not the standard Pigpen cipher. The Zodiac's ciphers used a much larger and more eclectic symbol set and were also homophonic — multiple symbols could represent the same plaintext letter — which Pigpen is not.

Q: Can I use Pigpen with numbers? A: The standard Pigpen alphabet covers only A–Z, so digits aren't included by default. There are several extended variants that add a fifth grid for the numerals 0–9, but there's no single standardised layout. An alternative is to spell the digits out as English words ("twenty-five" rather than "25"). See the Pigpen with Numbers section above for more detail.

Q: Is there a downloadable Pigpen cipher key or worksheet? A: Yes, we offer a free printable Pigpen Cipher Key PDF (the full 4-grid alphabet reference) and a Pigpen Cipher Worksheet PDF (practice cipher messages for students to decode). Both are free to use in classrooms, homeschool settings, scouting and youth-group activities, or as a hands-on introduction to cryptography.

Q: Is there a Pigpen cipher font I can download? A: Yes, we offer a free downloadable Pigpen cipher font suitable for typography, design, and craft use. The font renders the standard Pigpen alphabet when you type the corresponding plain-text letters — useful for designing custom puzzle pages, creating themed materials, or producing high-quality Pigpen-encoded text without a graphics editor. Simply install the font on your system (OTF format supported on Windows, macOS, and Linux), then type normally in any application that uses installed system fonts.

Related Tools

Feedback

If you liked using our decoder or want to share some suggestions, click the Feedback button below and fill out a simple form.

random sentence generator
Cite This Article

Pick a style below, and copy the text for your bibliography.

WORD SCRAMBLE. THE WORD FINDER located on the website https://www.thewordfinder.com/