Pigpen cipher
Encode text into the pigpen (Freemason) symbol cipher, or decode it back to letters.
Pigpen cipher
The pigpen cipher, also called the Freemason's cipher, replaces each letter of the alphabet with a geometric symbol taken from a grid instead of another letter or number. This tool converts text into that symbol alphabet and back, so you can encode a message for a puzzle, an escape room, a classroom activity, or simply decode a pigpen message someone sent you.
Choose a direction to convert text to pigpen symbols or pigpen symbols back to text. The grid assignment option switches between two letter-to-symbol mappings—standard, where A to Z fill the grids in order, and rotated, where the same 26 shapes are assigned back to front—so you can use a slightly different cipher than the textbook version. Output as descriptive characters renders each symbol as a compact, copyable sequence of box and wedge glyphs with an optional dot; output as an SVG image draws the actual pigpen shapes as vector line art you can paste into a document or resize freely, with symbol size controlling how large each drawn glyph is. Turn on the legend to print the full A-Z symbol key alongside your result, and keep spaces and punctuation on to preserve word breaks and other characters exactly as typed, or off to output only the converted letters.
Decoding is lenient: any symbol that doesn't match a known letter is left as-is or skipped rather than guessed at, and diacritics are folded to their base Latin letter before conversion (é becomes E, for example), since the pigpen cipher only covers A through Z. Very long input is handled safely—results are capped so the tab never freezes on a huge paste, and an oversized SVG render is rejected with a clear message before it's built.
Everything runs locally in your browser; nothing you type is ever uploaded. Copy the result, download it as a .txt file, or send it straight back into the input to decode what you just encoded.