How to use the Polybius square tool
- Choose the Direction: Letters → numbers or Numbers → letters.
- Optionally type a Keyword for the square. Leave it empty for the standard grid.
- Type into Your text.
- Read the Result. Each letter becomes two digits; letters are separated by spaces and words by a slash.
What it does and when to use it
The Greek historian Polybius described a way to signal letters with torches, using a grid of letters and two numbers for each one. The same grid sits at the heart of several later ciphers. On its own it turns text into digits 1 to 5, which suits knocking, flashing a light or hiding a clue in a list of numbers.
It hides nothing from anyone who knows the trick, even with a keyword: every letter always gets the same pair, so frequency analysis breaks it. Use it for puzzles and learning. The bifid cipher and the four-square cipher build on this grid to make stronger classical ciphers, and the tap code is the prison-wall version. For a simpler number code, see A1Z26.
How it works
The standard square, rows down the side and columns across the top:
| 1 | 2 | 3 | 4 | 5 | |
|---|---|---|---|---|---|
| 1 | A | B | C | D | E |
| 2 | F | G | H | I/J | K |
| 3 | L | M | N | O | P |
| 4 | Q | R | S | T | U |
| 5 | V | W | X | Y | Z |
Encoding. The text is split into words at spaces. In each word, only letters A to Z are kept, J becomes I, and each letter is written as its row digit then its column digit. Digits and punctuation are dropped, and a word with no letters vanishes.
Keyword square. The keyword’s letters go in first, left to right and top to bottom, skipping repeats, then the unused letters of the alphabet follow. With ZEBRA, the first row is Z E B R A and the second starts C D F G H.
Decoding. The input is split into words at slashes. In each word only the digits 1 to 5 count; they are read in pairs, and an odd number of digits gives a message. The output is in capitals. Everything runs in your browser.
Worked examples
Results from the tool:
Hello world → 23 15 31 31 34 / 52 34 42 31 14
Hello keyword ZEBRA → 25 12 33 33 41
2433 / 1114 decode → IN AD
Jam at 6! → 24 11 32 / 11 44
With the keyword, H moves from row 2, column 3 to row 2, column 5. The last line shows J sharing the I cell (24) and the 6 and the exclamation mark disappearing.
Limits and tips
- Upper and lower case give the same numbers; the decoded text is all capitals.
- When decoding, digits other than 1 to 5 are skipped without a warning, because the grid has no row or column 0 or 6 to 9. Check the input if a letter seems to be missing.
- Spaces inside a word are fine when decoding, but a space does not start a new word; only a slash does.
Frequently asked questions
Why is J missing from the square?
Do I need a keyword?
How do I decode numbers written without spaces?
How is this different from tap code?
How do we know nothing is uploaded? Test it yourself on the privacy proof page.