What Is the Masonic Cipher?

The Masonic Cipher, most widely recognised as the Pigpen Cipher or Freemason's Cipher, is one of history's most iconic geometric substitution ciphers. Rather than replacing each letter with another letter, it substitutes each character with a unique angular symbol derived from a pattern of intersecting lines and dots. The result is a visually striking secret writing system that has captivated historians, puzzle enthusiasts, and cryptographers alike for centuries.

Origins and History of the Pigpen Cipher

Early documented uses of the Pigpen Cipher date back to the 18th century, where Freemasons adopted it as a discreet method of correspondence among lodge members. The cipher's name comes from its foundational grid structure — two tic-tac-toe-style grids (resembling the fenced "pens" used for pigs) combined with two X-shaped grids, together accommodating all 26 letters of the Latin alphabet. Because of its long association with Freemasonry, many also call it the Freemason's Cipher or Masonic Code.

Historical records suggest the cipher appeared in Masonic lodge documents and personal diaries throughout the 18th and 19th centuries. It was not limited to Freemasonry, however — Rosicrucian societies adopted a variant rotated 45 degrees, sometimes called the Rosicrucian Cipher, adding further complexity to the symbol set.

How Does the Pigpen Cipher Work?

The standard Pigpen Cipher uses four distinct grids:

  • Grid 1 (plain) — a tic-tac-toe grid holding letters A–I
  • Grid 2 (dotted) — the same grid, each cell marked with a dot, holding letters J–R
  • Grid 3 (plain X) — an X-shaped grid holding letters S–V
  • Grid 4 (dotted X) — the same X-grid with dots, holding letters W–Z

To encode a letter, you draw the portion of the grid that surrounds it. For example, the letter A occupies the top-left cell of Grid 1 — its symbol is an open corner shape (⌐). The letter E sits in the centre of Grid 1 — surrounded on all four sides, its symbol is a square (□). Adding a dot distinguishes the J–R set from the A–I set.

The Tic-Tac-Toe Cipher Explained

The popular nickname "tic-tac-toe cipher" comes directly from the visual resemblance of the core grid to the familiar noughts-and-crosses game board. If you look at a blank tic-tac-toe grid and assign one letter to each of its nine cells, then draw the lines surrounding each cell as that letter's symbol, you have the first half of the Pigpen Cipher right there. This elegant simplicity — hiding a message in plain geometric shapes — is why the tic-tac-toe cipher continues to appear in modern escape rooms, treasure hunts, and puzzle books.

Pigpen Cipher vs. Masonic Cipher: Is There a Difference?

These two terms are largely interchangeable. "Pigpen Cipher" is the cryptographer's preferred term emphasising the method; "Masonic Cipher" or "Freemason's Cipher" emphasises the historical community that popularised it. Some purists distinguish between specific symbol arrangements used by different lodges, but for practical purposes both names refer to the same grid-based geometric substitution system. Online searches for masonic code decoder, freemason cipher chart, or pigpen cipher key all lead to the same fundamental cipher.

Modern Usage and Applications

Far from being a relic, the Masonic Cipher remains remarkably active in modern culture:

  • Escape rooms — Pigpen puzzles are a staple of physical and virtual escape room design.
  • Puzzle books and ARGs — Alternate reality games and printed puzzle collections frequently incorporate Freemason cipher challenges.
  • Education — Teachers use the cipher to introduce students to cryptographic concepts and substitution methods.
  • Tattoos and art — The geometric beauty of Pigpen symbols makes them popular for personal inscriptions.
  • Gaming — Video games like Assassin's Creed feature Masonic cipher references, fuelling player curiosity.

Example: Encoding "HELLO" in Pigpen

Take the word HELLO. In the standard Pigpen Cipher, H occupies the right-centre cell of Grid 1, E the centre cell, L the bottom-left cell (appearing twice), and O the right-centre cell of the same grid row as N. Each letter produces a unique angular symbol — no two look alike. When rendered on a page, HELLO becomes five distinct geometric shapes that, to an untrained eye, look like abstract art rather than a readable word.

Security Considerations

The Masonic Cipher is a monoalphabetic substitution cipher, meaning each letter always maps to one fixed symbol. This makes it vulnerable to frequency analysis — the same weakness shared by Caesar Cipher and Atbash. In English text, E, T, A, and O appear most often; a cryptanalyst can identify the most frequent symbols and cross-reference them against known letter frequencies to break the code without the key. The Pigpen Cipher should never be used for genuinely sensitive information — its value lies in historical significance and recreational cryptography, not modern security.