CipherWiz

Polybius Square Cipher

Encode and decode the Polybius square cipher. Each letter becomes two digits from a 5×5 grid. Add an optional keyword to mix the square.

How it works

The Polybius square places 25 letters in a grid of 5 rows and 5 columns, with I and J sharing one cell. Each letter is written as two digits: its row, then its column. In the standard square A is 11, B is 12, E is 15, F is 21 and Z is 55. A keyword changes the square: its letters are written first, without repeats, and the rest of the alphabet follows, so the same message gives different digits. When encoding, digit pairs are separated by spaces and words by a slash; other characters are dropped. When decoding, the translator reads the digits two at a time, so 121144 and 12 11 44 both work. The square used is shown under the result.

Example: BAT becomes 12 11 44 in the standard square. With the keyword ZEBRAS, A becomes 15, because the square starts Z E B R A.

Standard Polybius square

12345
1ABCDE
2FGHI/JK
3LMNOP
4QRSTU
5VWXYZ

Words in the Polybius square

WordDigits
HELLO23 15 31 31 34
BAT12 11 44
ATTACK AT DAWN11 44 44 11 13 25 / 11 44 / 14 11 52 33

Frequently asked questions

How do I decode a Polybius square?

Choose Decode and paste the digits. Each pair is a row and a column. If the result does not make sense, the sender may have used a keyword; enter it in the keyword box.

Why do I and J share a square?

The square has 25 cells and the alphabet has 26 letters, so I and J are combined. Some versions combine C and K instead, as in the tap code.

Who invented the Polybius square?

The Greek historian Polybius described it around 150 BC as a way to signal letters with torches: the number of torches in each hand gave the row and column.

What other ciphers use the Polybius square?

The tap code, the ADFGVX cipher of the First World War, and the bifid and nihilist ciphers all build on it.

Is the Polybius square secure?

No. Even with a keyword it is a simple substitution of letters by digit pairs, and frequency analysis breaks it.

Is my text sent to a server?

No. Everything runs in your browser and the text you type is not sent anywhere.

More text tools

Standard 5×5 square with I and J in one cell.