Join the Official Discord

Book cipher

Paste the key text (the book, letter or story), then the numbers. Pick how they count.

Each number is
Counting starts at
Direction
Result

How a book cipher works

Both people agree on a text: a particular edition of a book, a newspaper, a poem, a letter. The message is spelled out with numbers that point into it. The text is the whole key, and without it the numbers look meaningless, which made book ciphers popular with spies and very popular with puzzle setters.

The numbers can count different things, and the tool handles the common systems:

  • Word number, first letter: 12 means the twelfth word, and you keep its first letter. This is the classic system and the one Beale used.
  • Whole words: the numbers pick out entire words that read as a sentence.
  • Line and word: 12:4 (or 12.4, 12-4) means line 12, word 4. Paste the key text with its original line breaks. Some puzzles add a page number in front. If yours does, decode one page at a time.
  • Letter number: 12 means the twelfth letter of the text, ignoring spaces and punctuation.

The Beale ciphers

The most famous book cipher of all came from an 1885 pamphlet: three sets of numbers said to lead to a buried treasure in Bedford County, Virginia. The second set decodes against the Declaration of Independence, word by word, into a description of the treasure. Beale's copy of the Declaration numbered the words slightly differently from modern editions, so a straight decode needs some correcting by hand. The other two sets have never been solved.

Encoding your own

Switch to Encode and the tool picks a word for each letter of your message, choosing at random and avoiding repeats, so the same letter doesn't always become the same number. If the key text has no word starting with a letter you need (X and Z are the usual trouble), the tool tells you. Choose a longer text, or switch to letter numbers.

Questions

How does a book cipher work?

Sender and receiver share a text. Each number points to a word in it (or a line and word, or a single letter), and the message is spelled out by the first letters of those words. Without the right text, the numbers mean nothing.

How do I know which text is the key?

Look for a text the puzzle gives you or points to: a poem printed beside the numbers, a famous document, the puzzle's own story. Numbers that never go higher than a few hundred suggest a short text. Very large numbers suggest a whole book.

What about the Beale ciphers?

The second Beale cipher is famously a book cipher keyed to the Declaration of Independence, numbering its words. Beale's copy counted the words a little differently from modern editions, so a straight decode comes out with errors to correct by hand.

Should counting start at 0 or 1?

Almost always 1: the first word is word 1. If every decoded letter seems one word off, switch the counting to start at 0.

More cipher tools

See all cipher tools →