1001Ferramentas
🔢 Security

Polybius Cipher

Encode text with the Polybius cipher (5x5 square, I/J merged). Each letter becomes a row/column digit pair. Useful for puzzles and classical cryptography.

The Polybius square: letters become number pairs

The Polybius square is one of the oldest ideas in cryptography and perhaps the most reused: the 25 letters go into a five-by-five grid, and each letter becomes identified by its row and column. The word HI becomes 23 24. The technique is credited to the Greek historian Polybius, who proposed it in the second century BC for sending messages at a distance using torches.

Paste the text and receive the coordinate pairs. The alphabet has 26 letters and the grid holds only 25, so I and J share a cell — the standard convention for this cipher. When deciphering, context settles which one it was: in practice the reading rarely leaves doubt.

On its own the square protects nothing: it is a direct substitution, and letter frequency simply becomes pair frequency. Its value lies in being a building block. The square is the first step of Bifid, of the Nihilist cipher and of the ADFGVX cipher used in the First World War — in all of them, turning letters into coordinates is what allows the digits to be shuffled afterwards, destroying the letter structure.

Frequently asked questions

Why do I and J share a cell?
Because the modern Latin alphabet has 26 letters and the grid has 25 cells. Merging I and J is the most common choice because they were the same letter in Latin and the reading confusion is small. Another convention merges C and K; whoever deciphers has to know which was used.
Can a key be used?
It can, and that is what the more useful variants do: instead of the alphabet in order, the grid starts with a keyword and continues with the remaining letters. That changes every coordinate and adds a secret, but it is still substitution — frequency still gives it away.
What is the link with the tap code?
It is the same square. The code prisoners used to communicate by knocking on walls transmits exactly the row and the column, with a pause between the two numbers. The only difference is the channel: sound instead of writing.

Related Tools