Skip to content
TextArray
100% local

Polybius square

Turn letters into 5×5 grid coordinates (A → 11) and back, with an optional keyword.

Input

Polybius square

The Polybius square is one of the oldest ciphers on record: a 5×5 grid of the alphabet where every letter becomes its row-and-column pair — A is 11, B is 12, Z is 55, with I and J sharing a cell to make 26 letters fit 25 cells. Ancient Greeks signalled it with torches; today it appears in escape rooms, geocaching puzzles, CTF challenges and classroom cryptography.

Encoding turns text into digit pairs separated by spaces, with a / marking each word boundary, so MEET AT NOON becomes 32 15 15 44 / 11 44 / 33 34 34 33 and the round trip brings the words back. Decoding is forgiving about the input: pairs can be separated by spaces, commas or nothing at all — glued runs like 2324 split themselves — and an invalid pair is reported by name rather than silently skipped. Accented letters are normalized first, so č encodes as C and á as A, and ł or ß map to their Latin bases.

The keyword option rearranges the grid the classical way: the deduplicated letters of your keyword fill the first cells, the remaining alphabet follows. With the keyword SECRET, S becomes 11 and E becomes 12 — the same message encodes completely differently, and only someone knowing the keyword lays out the same grid to read it.

Like every classical cipher it is a puzzle, not protection — frequency analysis breaks it quickly. Everything runs locally in your browser, and nothing you type ever leaves your device.

FAQ

Why do I and J decode to the same letter?
The 5×5 grid has 25 cells for 26 letters, so I and J traditionally share one. Encoding treats J as I, and decoding always shows I — reading IUST as JUST is left to the human, as it has been for two thousand years.
How does the keyword change the cipher?
Its deduplicated letters fill the grid first, the rest of the alphabet follows. With SECRET the grid starts S, E, C, R, T…, so S encodes as 11 instead of 41. Both sides must use the same keyword.
What input does the decoder accept?
Digit pairs from 11 to 55, separated by spaces, commas, line breaks or nothing — 2324 works as well as 23 24. A / restores a space between words. Out-of-range pairs like 96 or an odd digit count produce a clear error naming the culprit.
What happens to digits, punctuation and accents?
Accented letters are normalized (č → C, á → A, ł → L, ß → SS) so they survive the grid. Digits, punctuation and emoji have no cell and are dropped from the encoding.
Is my text uploaded anywhere?
No. The cipher runs entirely in your browser and your text never leaves your device.