1001Ferramentas
🔢 Security

Custom Polybius Square

Build a 5×5 Polybius square with a key letter and encrypt/decrypt messages using numeric coordinates.

A Polybius square with the grid you build

A Polybius square in alphabetical order holds no secret: anyone who knows the method deciphers immediately, because the grid is always the same. Filling it from a keyword changes every coordinate and adds the one thing that was missing — something only the sender and the recipient know.

Enter the key and the page builds the five-by-five grid and shows it on screen: the key letters go in first with repeats dropped, and the rest of the alphabet fills the remainder in order. With the grid in view, converting either way is direct — each letter becomes its row-column pair, and each pair becomes a letter again. Since there are only 25 cells for 26 letters, I and J share one.

It is worth being clear about what the key fixes and what it does not. It stops anyone without it from reading directly, but the cipher is still substitution: each letter always becomes the same pair, and the language's frequency passes wholesale into the numbers. With enough text, frequency analysis reconstructs the grid. The keyed version earns its keep as the first stage of composite ciphers such as Bifid and ADFGVX.

Frequently asked questions

Does any word work as a key?
It does, and length matters more than the choice: a short key scrambles only the start of the grid and leaves the tail of the alphabet almost in order, which helps an attacker. A phrase without spaces, using varied letters, scrambles considerably more.
Why do I and J share a cell?
Because the grid has 25 cells and the alphabet 26 letters. Merging I and J is the most common convention, inherited from Latin where they were one letter. When deciphering, context resolves which it was — and whoever deciphers needs to know that was the choice.
Can a six-by-six grid be used?
It can, and that is what happens when digits need to fit: 36 cells hold the 26 letters plus the ten digits with no merging at all. The ADFGVX cipher uses exactly that grid, which is why it can encipher numbers alongside text.

Related Tools