Polybius Square Cipher — Encode & Decode
Encode and decode the Polybius square: 5×5 (I/J) or 6×6 with digits, an optional keyword, and digit or custom row/column labels such as ADFGX.
| 1 | 2 | 3 | 4 | 5 | |
|---|---|---|---|---|---|
| 1 | A | B | C | D | E |
| 2 | F | G | H | I | K |
| 3 | L | M | N | O | P |
| 4 | Q | R | S | T | U |
| 5 | V | W | X | Y | Z |
The Polybius square, described by the Greek historian Polybius around 150 BC, writes the alphabet in a 5×5 grid and replaces each letter with its row and column number, so HELLO becomes 23 15 31 31 34. It underlies tap code, the ADFGX and ADFGVX field ciphers of the First World War, and many puzzle hunts. This tool encodes and decodes with the classic square, a 6×6 square with digits, a keyword-mixed square and custom labels.
How to use this tool
- Choose encode or decode.
- Pick the 5×5 square (I/J shared) or 6×6 with digits.
- Optionally enter a keyword and labels such as ADFGX.
- Copy the coordinates (words are separated by " / ") or the decoded text.
Formula
letter at position p (0-based) in the square → label[⌊p / n⌋] followed by label[p mod n]
n is 5 or 6. The square is the keyword without repeated letters followed by the rest of the alphabet (and the digits 0–9 in the 6×6 version). In the 5×5 version J is written as I. Decoding reads pairs of labels: the first gives the row, the second the column.
Example
In the standard square ABCDE / FGHIK / LMNOP / QRSTU / VWXYZ, H is in row 2, column 3, so it becomes 23; E is 15, L is 31 and O is 34. HELLO therefore encodes to 23 15 31 31 34, and with the labels ADFGX, H becomes DF.
Frequently asked questions
What happened to J?
A 5×5 square has 25 cells, so I and J share one. Decoded text shows I; read it as J where the word needs it. The 6×6 square has room for all 26 letters and the digits.
How is this related to ADFGVX?
ADFGX and ADFGVX label the rows and columns with those letters (chosen because they are distinct in Morse code) and then shuffle the resulting letters with a keyword transposition. Setting the labels here gives the first, substitution step.
Is the Polybius square tap code?
Tap code uses the same idea, but drops K (C is used instead) and is sent as groups of taps. Use the tap code translator for that layout.
Does the Polybius square keep a message secret?
No. Even with a keyword it is a simple substitution, which frequency analysis breaks; it is an encoding for puzzles and signalling, not encryption.
Last updated:
Page address with these inputs: https://kakao.mobile/tools/polybius-square-tool/
Cite or embed this tool
kakaoCalc. (2026, November 8). Polybius Square Cipher — Encode & Decode. https://kakao.mobile/tools/polybius-square-tool/
“Polybius Square Cipher — Encode & Decode.” kakaoCalc, 8 Nov. 2026, kakao.mobile/tools/polybius-square-tool/.
Paste this code into your page. The widget runs in your visitors' browsers, shows no ads and keeps a link back to this page. Embedding terms