The Declaration of Independence

Thomas Jefferson & the Continental Congress — 1776

The key text behind the Beale Cipher 5 animation

American Founding July 4, 1776 Beale Key-Text
What is a Beale cipher? Each word in a chosen "key text" is numbered sequentially from 1. To encode a letter, you pick any word whose first letter matches — and write down that word's number. The decoder needs the same key text to reverse it. The cipher is named for Thomas J. Beale, who allegedly used this technique to hide the location of buried treasure in 1820s Virginia.

The Declaration of Independence is the historically documented key text for Beale's second cipher paper — the one that was actually cracked. In 1885, James B. Ward published a pamphlet claiming that Paper No. 2, which described the contents of the buried treasure, had been decoded using the Declaration. Each cipher number corresponded to a word in the Declaration, and the first letter of that word revealed the message.

Whether the treasure is real remains a mystery, but the connection between America's founding document and secret cryptography makes this the most historically resonant key text in the cipher series. The Declaration's soaring language — liberty, self-evident truths, the consent of the governed — gives every encoded letter a patriotic weight.

Try the Cipher → How the animation works →

Key-Text Index

Below is the one-to-one correspondence between each letter of the alphabet and every word position in the Declaration whose first letter matches. When encoding the letter L, for example, the cipher picks any number from the L list — so the same plaintext letter produces a different cipher number every time, preventing frequency analysis.

Loading key-text index…

The Declaration of Independence

In Congress, July 4, 1776

The unanimous Declaration of the thirteen united States of America


Loading document…

Ready to try the cipher?

Use the Declaration of Independence as your key text and encode your own secret message in Beale Cipher 5.

Open Beale Cipher 5 How the Algorithm Works