Word-letter coordinates

Book cipher

Encode letters as strict 1-based word.letter coordinates, or decode those coordinates with the same key text.

01 / Workspace

Use a shared text as the key

Mode

Encode turns message letters into coordinates from the key text.

0 / 20,000 code points

Words are maximal runs of Unicode letters. Punctuation, numbers, emoji, and whitespace split words and do not receive positions.

Options

When selected, encoding matches upper and lower case together, and decoding returns lowercase letters. Clear it for exact case-sensitive matching.

0 / 2,000 code points

Letters must occur in the key. Space, tab, and line feed become SP, TAB, and LF tokens. Other message symbols are rejected.

Keyboard: press Ctrl+Enter or Command+Enter anywhere in this tool to run the selected mode.

Ready to encode.

02 / Result

Result

No result yet

Coordinates use W.L, where both numbers start at 1. Tokens are separated by whitespace.

03 / Exact convention

How this version counts

  1. Find key words. A word is a maximal run of Unicode letters. Apostrophes, hyphens, digits, punctuation, emoji, and all whitespace end a word. Words are numbered from 1 across the whole key text, regardless of line breaks.
  2. Count letters. Letters within each word are numbered from 1. A base letter plus following Unicode combining marks counts as one letter unit. Text is not normalized, so composed and decomposed forms can differ.
  3. Read coordinates. 4.6 means letter 6 of key word 4. SP, TAB, and LF represent one space, one tab, and one line feed. Every other token is invalid.
  4. Resolve repeats. If a message letter occurs more than once in the key, encoding always chooses the earliest word, then the earliest letter within that word. The same inputs and option always give the same result.
  5. Fail without partial output. Encoding rejects missing letters and unsupported symbols. Decoding checks every token, word number, and letter number before showing any result.

Self-contained example

The original key text Calm rivers carry bright notes. Owls map quiet paths at night. numbers Calm as word 1, rivers as word 2, and so on.

Message
meet at noon
Coordinates
1.4 2.4 2.4 4.6 SP 1.2 4.6 SP 5.1 5.2 5.2 5.1
Round trip
Decoding those coordinates with the same key and case option returns meet at noon.

The repeated e always uses 2.4, even though later key words also contain e.

Limits and security

  • The key is limited to 20,000 Unicode code points. A message may contain up to 2,000 code points, and a coordinate stream may contain up to 30,000 code points and 2,000 tokens.
  • Coordinate numbers use one to five decimal digits, cannot start with zero, and must be in range for the current key. Tokens such as 1-2, 0.1, and 1.0 are invalid.
  • Key punctuation does not occupy a coordinate. Message punctuation, digits, isolated combining marks, and emoji are not silently changed or copied; encoding reports them as unsupported.
  • Both people need the exact same key text, tokenization rules, and case option. Other book cipher tools may count pages, lines, characters, or word initials, so their results may not match.
  • Classical ciphers are educational and unsuitable for sensitive data. A known or guessed key text makes these coordinates straightforward to decode.