Polybius Square Cipher Encoder
Encode text with the Polybius square cipher right in your browser, or switch to any other classical cipher.
Input
Output
Guide
What is the Polybius square cipher?
The Polybius square cipher writes each letter as two digits: the row and the column of its cell in a 5 × 5 grid of the alphabet. It's named after the Greek historian Polybius. In his Histories, he described the square as a way to signal with torches, and he credited its invention to Cleoxenus and Democleitus. The grid has 25 cells for 26 letters, so I and J share one. Today it shows up in escape rooms and code-breaking lessons, and the tap code that prisoners knocked on walls is built on the same kind of square.
How the square works
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 ZRead the row first, then the column. T sits in row 4, column 4, so it's 44. E is 15, and A is 11. The pairs of one word go side by side, so Tea party becomes 441511 3511424454.
Tool description
Each letter you type in the Plain text box appears as a digit pair in the Cipher text box, where you can copy it. Spaces, punctuation and line breaks are kept, and capital and small letters give the same pair. The Key field shows Not needed, because the tool always uses the square above, A to Z in order. Insert sample adds the message See you at the park at noon, which comes out as 431515 543445 1144 442315 35114225 1144 33343433. To read pairs, use the Polybius Square Cipher Decoder or the swap button between the boxes, which turns the pairs back into letters. The Cipher menu has other classical ciphers too, such as Playfair, which builds its own 5 × 5 square from a keyword.
Examples
| Plain text | Cipher text |
|---|---|
Lemon tart |
3115323433 44114244 |
Fly a kite |
213154 11 25244415 |
Jump in the pool! |
24453235 2433 442315 35343431! |
Movie night |
3234512415 3324222344 |
Crème brûlée |
1342153215 124245311515 |
J, digits and accents
- J has no cell of its own, so it's written as 24, like I, and decoding gives it back as I:
Jumpcomes back asIUMP. - Digits pass through as they are, and that can trick the decoder:
Table 34turns into4411123115 34, and the 34 reads as O, givingTABLE O. Write numbers as words to avoid this. - Digits glued to a word get lost among its pairs:
1pmbecomes13532. - Accents are dropped first, so
ègives 15, just likee.ßand the letters of other alphabets have no cell, so they stay as they are.
Other squares and tips
- Some puzzles fill the square from a keyword: first its letters, then the rest of the alphabet. This tool always uses the plain A to Z square, so it can't read those.
- The tap code puts C and K in one cell instead of I and J. A message written with that square decodes here with K wherever it had J, and C for every K.
- Encoding happens in your browser, so nothing you type is sent anywhere.