Morse Code Translator
  1. Translator
  2. Pigpen cipher history

Pigpen cipher history and facts

Explore pigpen’s earlier grid schemes, eighteenth-century Freemason use and a documented Masonic gravestone. Compare two different alphabet keys.

Pigpen history includes an earlier Hebrew grid scheme, eighteenth-century Freemason use and a documented Masonic gravestone. (Agrippa, Book III, chapter 30), (NIST activity), (Trinity Church).

1. What is a pigpen cipher?

Pigpen substitutes geometric marks for letters. You place letters in a key made from grids, then write the portion of the grid surrounding each letter. A dot distinguishes some letters that otherwise have the same outline. NIST's activity sheet shows a version with square-grid compartments and compartments formed by crossed diagonal lines (NIST, cipher key).

For a first reading, keep three things separate: the letter you want to write, its position in the key, and the mark you copy from that position. The key is your reference. Copying a familiar-looking corner without checking its orientation can give your partner a different letter.

For a classroom activity alongside other systems, use secret codes for kids.

2. Who invented the pigpen cipher?

The sources here describe earlier grid schemes and later pigpen uses, without identifying one inventor of today's alphabet. In Book III, chapter 30 of Of Occult Philosophy, Heinrich Cornelius Agrippa describes Hebrew letters arranged in nine compartments. One, two or three points identify which letter in a compartment is intended. He then combines marks in an example involving the name Michael (Agrippa, chapter 30).

Wellcome Collection's catalog dates the complete work's first publication to 1533 and its English edition to 1651 (Wellcome, publication and notes). Those dates place this grid-based scheme before the eighteenth-century Freemason use described by NIST (NIST, historical note).

Agrippa discusses the arrangement in a religious and symbolic setting, with Hebrew letters and their numerical classes (Agrippa, chapter 30). Describing his scheme separately preserves that context. Saying he invented the modern English pigpen key would go beyond what these passages establish.

3. Why is it called the Freemason's cipher?

NIST states that Freemasons used pigpen in the eighteenth century to keep records private (NIST, historical note). Pigpen is sometimes called the Freemason's cipher (Haverhill Family History Group, hosted by Haverhill Town Council).

4. A real Masonic gravestone carries a message

Trinity Church's burial record identifies James Leeson as a Mason who died in 1794, aged 38. His stone in Trinity Churchyard, New York, carries a Masonic cryptogram. The church gives its reading as “Remember Death.” It also records that the parish's Trinity Record published the key in 1889 (Trinity Church).

A blank notebook and envelope sit beside a small gravestone silhouette and an unmarked ruler.
Illustration: Objects for a historical inquiry

This is a useful historical anchor because you have a named person, a burial record and the institution's explanation of the inscription. Keep the dates attached to their separate claims: 1794 belongs to Leeson's death; 1889 belongs to publication of the key. Neither date, by itself, establishes when the cipher was invented.

5. Pigpen keys can arrange the letters differently

NIST's worksheet places undotted and dotted letters in separate grids. The table names its groups without drawing the cipher marks (NIST, illustrated key).

Letter groups in the NIST worksheet's pigpen variant
LettersPosition and distinguishing feature
A–IFirst square grid, read across its rows; undotted outlines.
J–RSecond square grid, read across its rows; dotted outlines.
S–VFirst crossed-diagonal grid; undotted outlines.
W–ZSecond crossed-diagonal grid; dotted outlines.

The Haverhill Family History Group sheet uses a different arrangement. It pairs letters within compartments, beginning with A and B together. You add a dot for the second letter in a pair (Haverhill Family History Group, hosted by Haverhill Town Council). Under that sheet, B is the dotted partner of A; on NIST's sheet, J occupies A's matching dotted position (NIST key). Always identify the particular key before translating a mark.

6. How should you examine a historical message?

Start with an accurate copy. Preserve spaces, line breaks and dots.

  1. Make a working inventory. Give each different mark a temporary label in your notes. Keep rotated shapes separate.
  2. Record your key. Write down which worksheet or historical alphabet you are testing.
  3. Check consistency. Apply a proposed letter replacement everywhere that mark appears. Keep uncertain readings in pencil.
  4. Test another arrangement. If the result fails, return to the source image and the key before changing individual letters to force a sentence.

For a small practice exercise, ask a partner to choose one of the two linked worksheets and encode a short greeting. Have them name the worksheet after your first attempt. Compare what changed in your reading once you knew the key. You can use Morse code puzzles for a separate decoding exercise.

How is pigpen different from Morse code?

Pigpen's worksheets identify letters by drawn shapes. International Morse assigns letters sequences of short and long signals, with defined spacing (NIST worksheet), (ITU, Annex 1, sections 1–2). The player below sends CODE in International Morse. Use it to compare a timed signal with the written grid system.

Morse comparison: this player does not generate pigpen symbols.

Check the letters against the International Morse alphabet chart, then enter a word in the Morse code translator. For listening practice, follow the lessons for learning Morse by ear.

Whether Morse code is a cipher explains the terminology.

For another use of a shared letter grid, explore the row-and-column tap code.

Sources

  1. Pig Pen Cipher, Cybersecurity Career Awareness Week activity. National Institute of Standards and Technology, checked 11 November 2026.
  2. Heinrich Cornelius Agrippa, Of Occult Philosophy, Book III, chapter 30. Esoteric Archives, digital edition by Joseph H. Peterson, digital edition updated 26 April 2019; checked 11 November 2026.
  3. Three books of occult philosophy, English edition, 1651. Wellcome Collection, checked 11 November 2026.
  4. Trinity Churchyard: James Leeson. Trinity Church, checked 11 November 2026.
  5. Pigpen, family-history activity sheet. Haverhill Family History Group, hosted by Haverhill Town Council, checked 11 November 2026.
  6. Recommendation ITU-R M.1677-1, International Morse code. ITU Radiocommunication Sector, October 2009.