Polybius Square Cipher

Learn how to use the Polybius Square Cipher Tool for encoding and decoding text with the classic 5x5 grid.

Last reviewed: April 2026

New to this tool? Click here for instructions

12345
Plaintext
Encoded
Enter text above to encode using the Polybius square.

How to Use the Polybius Square Tool

The Polybius Square Cipher Tool is a free online tool that allows you to encode and decode text using the classic 5x5 Polybius grid. To use the tool, choose Encode when you have plain text and want coordinate pairs, or Decode when you already have pairs such as 23 15 31 31 34. If you want a custom grid, open Custom Key, enter a keyword, and apply it before you encode or decode anything.

  • Choose Encode for plain text to coordinate pairs
  • Choose Decode for pairs to original text
  • Use Custom Key for a shuffled square

When This Cipher Is Useful

The Polybius Square Cipher is useful for teaching classical ciphers, designing puzzle trails, and bridging into related systems such as Tap Code. It is simple enough for beginners to learn quickly but structured enough to show how keyed alphabets and substitution schemes work. It is not modern security. Its value is in teaching, puzzle design, and historical context, not in protecting sensitive information.

How the Polybius Square Works

The classic system uses a 5x5 grid, so one cell has to do double duty. In this version, I and J share the same position. A letter is encoded as two digits: the first digit is the row, and the second digit is the column. A keyword changes the order of letters in the grid by placing the deduplicated keyword first and then filling in the rest of the alphabet. Anyone decoding the message needs the same keyed square, otherwise the pairs resolve to the wrong letters.

Tips and Limitations

Encoding removes spaces and punctuation, so add your own grouping if you want the output to stay readable. Because I and J share one cell, the decoded text may need context to tell which letter was intended. Short messages and custom keys make better puzzles than long passages. Like other monoalphabetic systems, Polybius-style encoding is vulnerable to pattern and frequency analysis.

Frequently Asked Questions

The Polybius square is a cipher invented by the ancient Greek historian Polybius. It uses a 5x5 grid where each letter is encoded as its row and column numbers.
The 26-letter English alphabet doesn't fit in a 5x5 grid (25 cells). I and J are combined because they're phonetically similar and context usually clarifies which is meant during decoding.
A keyword Polybius square places the keyword letters (deduplicated) first in the grid, then remaining alphabet letters. This shuffles the encoding, making frequency analysis harder.
Switch to Decode mode and paste your number pairs separated by spaces. The tool will convert these pairs back into the original text.
The Tap Code is a direct application of the Polybius square. Each letter is communicated as two sequences of taps representing the row and column. K is merged with C.