Encode or decode text using the grid-based Polybius square cipher — a classic technique from ancient cryptography.
Think of the Polybius square as a coordinate system for letters. Each letter gets a two-digit code where the first digit is its row (1-5) and the second digit is its column (1-5). It's like giving every letter a map location.
Original: "SECRET MESSAGE"
Encrypted: "43 15 13 42 15 44 32 15 43 43 11 22 15"
Each pair of numbers represents one letter. Spaces between words are preserved.
Encrypted: "23 15 31 31 34 44 34 24 42 31 14"
Decrypted: "HELLO WORLD"
Notice how "I/J" combination works—both letters share position 24.
| # | 1 | 2 | 3 | 4 | 5 |
|---|
Each letter is replaced by its row and column numbers in the grid.
Example: "HELLO" → "23 15 31 31 34"
I and J share the same cell (2,4) in the standard grid.
All text processing happens directly in your browser. Nothing is sent to our servers or stored anywhere. Your messages remain completely on your device.
The Polybius square, also known as the Polybius checkerboard, is a device invented by the ancient Greeks Cleoxenus and Democleitus, and made famous by the historian and scholar Polybius. It was originally used for fire signalling, allowing the transmission of any message by torches.
The cipher uses a 5×5 grid containing all the letters of the alphabet (I and J typically share a cell). Each letter is represented by its coordinates (row, column) in the grid. For example, in the standard grid, A=11, B=12, ..., E=15, F=21, etc.
While the Polybius square is an interesting historical cipher, it's not secure by modern standards. It's a simple substitution cipher that's vulnerable to frequency analysis. However, it's excellent for teaching the fundamentals of cryptography and for recreational puzzle-making.
While the Polybius cipher is simple, it forms the basis for more complex ciphers. You can layer it with other techniques:
This tool is part of our classical cipher collection. If you enjoy this, you might also like exploring the Vigenère cipher tool for a more robust polyalphabetic approach, or the Rail Fence cipher for a different transposition method.
Designed for clarity and educational use. Last reviewed for accuracy: Jan 2026