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
| 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 |
Words in the Polybius square
| Word | Digits |
|---|---|
| HELLO | 23 15 31 31 34 |
| BAT | 12 11 44 |
| ATTACK AT DAWN | 11 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
Cipher Decoder and Identifier
Morse Code Translator
Binary Translator
ASCII Converter
Hex to Text Converter
Leet Speak Translator
Caesar Cipher Encoder and Decoder
Vigenere Cipher Encoder and Decoder
Atbash Cipher Encoder and Decoder
Word Counter and Character Counter
ROT13 Decoder and Encoder
Playfair Cipher Encoder and Decoder
Rail Fence Cipher Encoder and Decoder
Braille Translator
Pigpen Cipher Translator
Letter to Number Converter (A1Z26)
Bacon Cipher Encoder and Decoder
Tap Code Translator
Standard 5×5 square with I and J in one cell.