Polybius Square

Convert text using the ancient Polybius square cipher with a 5x5 grid substitution method.

How to Use Polybius Square

  1. Enter text and select Encode.
  2. Each letter is looked up in the fixed 5×5 square; J shares I’s cell.
  3. Read row then column as a two-digit coordinate, with spaces inserted between every input character.
  4. Select Decode to extract digit pairs and map them back to letters.

A Polybius square replaces letters with coordinates. This component uses A–E in row 1 through V–Z in row 5, combining I/J at 24.

The 5×5 Polybius square

Every letter sits at a row–column coordinate. Read the row number first, then the column, each from 1 to 5. English has 26 letters but the grid holds only 25 cells, so I and J share cell 24 (other variants instead merge C/K or drop a rare letter).

12345
1ABCDE
2FGHI/JK
3LMNOP
4QRSTU
5VWXYZ

To encode a letter, find it in the grid and write its row then its column. H is in row 2, column 3 → 23. To decode, split the message into digit pairs and look each coordinate back up.

Examples

Fixed square — input:

HELLO

Output:

23 15 31 31 34

J shares coordinate 24 with I — input:

JAZZ

Output:

24 11 55 55

Worked example: encode HELLO step by step

Take each letter in turn, read its row then its column, and write the two-digit coordinate:

LetterRowColumnCode
H2323
E1515
L3131
L3131
O3434

So HELLO → 23 15 31 31 34. To decode, split the digits back into pairs and look up each coordinate in the grid. Because I and J share cell 24, a decoded 24 could be either letter — context decides which fits.

A short history

The square is named after the Greek historian Polybius (c. 200 – c. 118 BC), who described it in his Histories as a way to send messages one letter at a time using pairs of torches — the first group of torches on the left gave the row, the second on the right gave the column. Turning letters into number pairs made long-distance signaling practical long before the telegraph.

Because it converts letters into coordinates, the same grid became a building block for many later systems: the prisoner-of-war tap code, and grid-based ciphers such as Bifid, ADFGX, the Nihilist cipher, and Playfair-style squares. On its own the Polybius square is a simple substitution and not secure by modern standards — today it is used for puzzles, CTF challenges, and learning how fractionation ciphers work.

Frequently asked questions

What is the Polybius square?

A 5×5 grid that turns each letter into a pair of numbers — its row and its column. It was described by the Greek historian Polybius around the 2nd century BC and is the basis for several later ciphers.

How do you read the coordinates?

Read the row number first, then the column, each from 1 to 5. H sits in row 2, column 3, so it becomes 23; the word HELLO becomes 23 15 31 31 34.

Why are I and J combined?

The alphabet has 26 letters but the grid has only 25 cells, so two letters must share one. The most common choice merges I and J at 24; other variants instead merge C and K, or drop a rare letter.

How do you decode a Polybius message?

Split the digits into pairs and look up each pair in the grid — first digit is the row, second is the column. Since I and J share cell 24, a decoded 24 can be either letter, so context decides.

Is the Polybius square secure?

No. On its own it is a simple substitution that is easy to break, so it is not secure by modern standards. It is used for puzzles, CTFs, and learning cryptography.

What ciphers are based on it?

Because it converts letters into coordinates, the square underpins the tap code and grid-based ciphers such as Bifid, ADFGX, the Nihilist cipher, and Playfair-style squares.

Features

Privacy Focused

All processing happens in your browser. No data is sent to servers.

Free Forever

No registration, no limits, completely free to use.