Introduction
The Beale ciphers are three numerical ciphertexts published in 1885 in a pamphlet titled "The Beale Papers" by James B. Ward in Lynchburg, Virginia. They allegedly describe a treasure of gold, silver, and jewels buried in Bedford County, Virginia, by Thomas Jefferson Beale around 1820. Cipher No. 2, which lists the treasure's contents, was solved using the Declaration of Independence as a book cipher key. Ciphers No. 1 (the location) and No. 3 (the heirs) remain unsolved. This tool decodes Beale-style book ciphers using the Declaration of Independence or any key text you provide, letting you reproduce the famous No. 2 decryption and experiment with candidate keys for the unsolved ciphers.
What this tool does
- Decodes book ciphers where each number refers to a word in a key text and the first letter of that word is the plaintext letter.
- Encodes plain text into a book cipher using a key text of your choice.
- Ships with the full Declaration of Independence as the default key text for Beale No. 2.
- Lets you paste any custom key text to test candidate books for the unsolved ciphers.
- Runs entirely in your browser with no server-side processing.
How this tool works
Select Decode or Encode. The default key text is the Declaration of Independence. In decode mode, paste a space-separated list of numbers into the input field. The tool splits the key text into numbered words, looks up the Nth word for each number, and extracts its first letter as the plaintext character. In encode mode, type plain text and the tool finds the first word in the key text whose initial letter matches each plaintext letter, emitting its 1-indexed position. You can replace the key text with any book, document, or passage to test alternative keys. The output updates instantly.
How the Beale ciphers work
A book cipher uses a shared text as the key. The sender numbers the words of the key text starting at 1 and, for each plaintext letter, finds a word whose first letter matches, then writes down that word's number. The receiver reverses the process: for each number, they take the first letter of the corresponding word in the key text. The Beale ciphers use this method. Cipher No. 2 was solved when the anonymous author of the pamphlet tried the Declaration of Independence as the key text and recovered a message beginning "I HAVE DEPOSITED IN THE COUNTY OF BEDFORD ABOUT FOUR MILES FROM BUFORDS...". The decryption works because the Declaration's word frequencies provide enough coverage for the letters in the message. Ciphers No. 1 and No. 3 have resisted hundreds of candidate key texts, leading some researchers to suspect the entire story is a hoax. Statistical analysis of cipher No. 1 suggests it may not encode meaningful English at all. The treasure, estimated at over $60 million as of 2025, has never been found despite extensive searching in Bedford County.
How to use this tool
- Select Decode to convert numbers to text, or Encode to convert text to numbers.
- The key text field is pre-loaded with the Declaration of Independence. Replace it with any text to test alternative keys.
- In decode mode, paste a space-separated list of numbers into the input field.
- Read the decrypted plaintext in the output field, which updates live.
- Use the Copy button to copy the result to your clipboard.
Real-world examples
Decoding Beale No. 2
Key text: Declaration of Independence. Input: `115 243 437 904 462 44 421 121 445 314 500 213`. Output begins: `IHAVDEPOSITEDINT`. Each number refers to a word in the Declaration; the first letter of that word is the plaintext letter.
Encoding with a custom key
Key text: any passage. Input: `HELLO`. Output: five numbers, one per letter, each pointing to the first word in the key text that starts with the matching letter.
Testing a candidate key for No. 1
Replace the key text with a candidate book (the Bible, Shakespeare, a specific edition of a novel) and paste cipher No. 1's numbers. If the output is readable English, you may have found the key. No candidate has produced readable text for No. 1 in over a century of attempts.
Comparison with similar methods
| Method | Complexity | Typical use |
|---|---|---|
| Beale (book cipher) | O(n) — one lookup per number | Historical treasure cipher |
| Ottendorf cipher | O(n) — page, line, word lookups | Three-part book cipher |
| Running key cipher | O(n) — Vigenere with key text | Historical military cipher |
| Vigenere | O(n) — one substitution per letter | Historical military cipher |
Limitations or considerations
This tool implements a simple book cipher where each number maps to the first letter of the Nth word. The real Beale ciphers may use a more complex variant (for example, numbering letters instead of words, or using a different edition of the key text). The Declaration of Independence text included here is a standard modern transcription; the original 1820s edition used by Beale may have had slightly different word counts, which affects decryption. Ciphers No. 1 and No. 3 have never been solved, and no candidate key text has produced readable output.
Frequently asked questions
Has anyone found the Beale treasure?
No. Despite over a century of searching in Bedford County, Virginia, the treasure has never been found. The estimated value is over $60 million as of 2025. Many researchers believe the story is a hoax.
How was Beale No. 2 solved?
The anonymous author of the 1885 pamphlet tried the Declaration of Independence as the key text. Numbering its words from 1, the first letter of each numbered word produced a readable inventory of the buried treasure.
Why are ciphers No. 1 and No. 3 still unsolved?
Hundreds of candidate key texts have been tried without success. Statistical analysis of cipher No. 1 suggests it may not encode meaningful English, supporting the hoax theory. The correct key text, if it exists, has not been identified.
What key text does this tool use by default?
The Declaration of Independence, which is the known key for Beale No. 2. You can replace it with any text to test candidate keys for the unsolved ciphers.
Conclusion
The Beale Ciphers Decoder lets you reproduce the famous decryption of Beale No. 2 using the Declaration of Independence and experiment with custom key texts for the unsolved ciphers. The tool implements a standard book cipher where each number maps to the first letter of the corresponding word in the key text. Whether the Beale treasure is real or an elaborate hoax, the ciphers remain one of cryptography's most enduring mysteries.