Built and fact-checked by the DocNectar team — see our editorial standards
Key Features
Instant Calculation
Get accurate results in real time with our optimized algorithm.
Mobile Friendly
Fully responsive design. Works on all devices & screen sizes.
Privacy Focused
Your data stays on your device. We don't store any inputs.
100% Free
No hidden costs. This tool is completely free forever.
A book cipher hides a message by referencing the position of each word inside a shared reference text (traditionally a specific book both sender and receiver own) instead of scrambling letters directly.
This tool encodes text into word-position numbers, or decodes a list of numbers back into words, using any reference text you provide.
How it works
Every word in your reference text is numbered in order, starting from 1. To encode, each word in your message is looked up in the reference text, and its position number is used in its place. To decode, each number is used to look up the word at that position in the reference text. Both sides need the exact same reference text for this to work.
- Enter mode.
- Enter text or Numbers.
- Enter reference Text (shared key).
- Click Calculate to see your results.
Examples
Reference text "the quick brown fox jumps over the lazy dog"
Encoding "the fox jumps" against that reference text produces "1 4 5" (word 1 = "the", word 4 = "fox", word 5 = "jumps").
Who should use it
- Puzzle and escape-room style word games with a real reference document.
- Teaching how a shared secret (rather than a mathematical key) can drive encryption.
Industry applications
- Cryptography education and history
- Games and puzzles
Advantages
- Conceptually simple and historically significant, with real espionage use.
- Can be genuinely difficult to break without the exact reference text.
Limitations
- Only works for words that actually appear in the reference text.
- Both sides must have access to the exact same reference text, word for word.
Common mistakes to avoid
- Using a slightly different reference text (extra spaces, different edition, etc.) when decoding than the one used to encode — the word positions must match exactly.
- Expecting to encode a word that never appears anywhere in the reference text.
Best practices
- Keep the exact reference text used for encoding somewhere safe — without word-for-word the same text, decoding is impossible.
- Use a longer, more varied reference text if your message uses many different words, so more of them can be found.
Tips
- If you plan to encode a specific message, check first that every word you need actually appears somewhere in your reference text — otherwise pick a longer or more varied reference text.