The Magic Codex

Pigpen Cipher

The Freemasons' secret script, drawn live in your browser. Encode text into pigpen symbols — or click symbols to decode them back.

Lowercase letters get a small underline tick beneath their symbol — the historical cipher had no case, so this is our invention for keeping it.

How to use the Pigpen Cipher translator

Pigpen replaces letters with little geometric fragments — perfect for secret notes, treasure hunts, and puzzle nights.

  1. To encode: stay on the Encode tab and type. Your message appears as symbols instantly; copy the notation to share it as text, or copy the SVG to paste the drawings into a document.
  2. To decode: switch to the Decode tab and click the symbols you see in the puzzle — each click appends a letter. You can also type the notation directly.
  3. Stuck reading a symbol? Match its shape against the A–Z chart in the sidebar: corner shapes are corner cells, U-shapes are edge cells, dots mean the second grid or second X.

How the cipher works

Draw two tic-tac-toe grids and two X shapes. Write A–I in the first grid, J–R in the dotted second grid, S–V in the first X, and W–Z in the dotted X. Each letter's symbol is the fragment of lines surrounding its cell — so A (top-left corner) is a corner, E (dead center) is a box with an opening, and J is A's shape with a dot.

A tiny history

Grid ciphers like this appear as early as the 1500s, but pigpen is remembered as the Freemasons' cipher — lodges used it to keep minutes and correspondence private in the 1700s and 1800s. Some Masonic lore traces it to the Knights Templar. These days you'll meet it in escape rooms, puzzle hunts, and the margins of very cool notebooks.

What is the pigpen cipher?
A geometric substitution cipher where each letter becomes a fragment of a grid: A–I sit in a plain tic-tac-toe grid, J–R in a dotted one, and S–Z in X shapes (plain then dotted). Each letter's symbol is the set of grid lines bordering its cell. It's also called the Masonic or Freemason's cipher.
How do I read pigpen symbols?
Picture the two tic-tac-toe grids and the two X shapes. A symbol's lines are the walls around the letter's cell — a corner shape is a corner cell, a U-shape is an edge cell, a box fragment is the center. Dots mean the second grid (J–R) or the second X (W–Z). The reference chart on this page shows all 26.
How do I decode pigpen symbols I see in a puzzle?
Click the matching symbols on the decode palette — each click appends that letter to your decoded text. Or use the text notation: grids are a row letter plus column digit (B2 = E, lowercase b2 = N), X shapes are X1–X4 (lowercase x1–x4 for the dotted set).
Does the pigpen cipher distinguish uppercase and lowercase?
Historically, no — pigpen has no case. This translator preserves it as a courtesy: lowercase letters get a small underline tick beneath their symbol when encoding, and the decode tab has a lowercase toggle for the output text.
Who used the pigpen cipher?
It's most associated with the Freemasons, who used it to keep their records private in the 1700s–1800s. Variants appear far earlier — similar grid ciphers show up in the 1500s, and some trace the idea to the Knights Templar. Today it lives on in puzzle hunts, escape rooms, and kids' secret messages.
Is the pigpen cipher secure?
Not at all — it's a fixed substitution, so anyone who recognizes the symbols (or tries frequency analysis) reads it instantly. It's wonderful for games, puzzles, and treasure hunts, but never for real secrets.
Is my text sent anywhere?
No. All translation happens in your browser with JavaScript. Nothing is uploaded, stored, or tracked.

Need help with this tool?

Found a bug, or have a suggestion for the codex? Write to us — a real human reads every message.

[email protected]

More from the codex