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?
Why do I and J share a cell?
Can a six-by-six grid be used?
Related Tools
Playfair Cipher Step by Step
Encrypt/decrypt with Playfair showing the 5×5 matrix, letter pairs and the rule applied to each digram.
Trifid Cipher
Encodes each letter of a message as its three coordinates in the 3x3x3 Delastelle grid, the fractionation step that the Trifid cipher is built on.
Hill Cipher 2×2
Encrypt text with a 2×2 matrix mod 26 (Hill cipher) — algebraic explanation and key invertibility check.
Affine Cipher with Explicit Keys (a, b)
Encrypts text with E(x) = (a·x + b) mod 26, refuses any key a that shares a factor with 26, and prints the modular inverse needed to decrypt.
Trithemius Cipher
Polyalphabetic cipher where letter n is shifted by n positions (similar to Vigenère with key ABCDEF…). Invented by Johannes Trithemius in the 16th century.
Encrypt Text
Apply classic ciphers (Caesar, ROT13, Atbash) or Base64. Useful for puzzles, CTFs and testing — do not use for real security.