# Polybius Square Cipher

Canonical URL: https://offlineutils.com/polybius-square
Category: Codes & Ciphers
Published: 2026-10-20
Publisher: offlineutils.com
Runs entirely in the browser; nothing entered into the tool is uploaded.

> A Polybius square cipher replaces each letter with its row and column in a grid of the alphabet, so BAT becomes 12 11 44. This tool encodes and decodes with the standard I/J square, the C/K square, a 6×6 square with digits, or a square reordered by a key, and decodes unkeyed messages by trying every square and order, entirely in your browser.

The Greek historian Polybius described the device in the 2nd century BC, crediting it to Cleoxenus and Democleitus: the alphabet laid out in a grid, so that any letter could be signalled with two numbers — in their case, by raising torches. With the Latin alphabet the grid is 5×5, so two letters have to share a cell: usually I and J, sometimes C and K, as in the tap code. A 6×6 grid fits all 26 letters and the ten digits with nothing merged.

On its own the square is a fixed substitution, and anyone who knows the convention can read it. What makes it useful is what it feeds: the Bifid and Nihilist ciphers build on it, the German army's ADFGX and ADFGVX ciphers of 1918 used it with letters for coordinates, and the tap code is a Polybius square sent by knocking. A key makes it a little stronger by reordering the grid: the key's letters go first, without repeats, then the rest of the alphabet.

The hard part of decoding is that the ciphertext doesn't say which convention it used. This tool decodes every square — I/J, C/K and 6×6 — with coordinates read row-first and column-first, and ranks the six readings by how English their letter pairs look; give it the key and it uses that too. Digits can be spaced, run together or comma-separated. Encoding shows the square you're using, skips spaces, and reports any characters the square has no cell for rather than dropping them silently.

## Features

- Encodes and decodes with I/J, C/K and 6×6 squares
- Reorders the square with a key, using the standard keyed-square convention
- Decodes without knowing the square: all squares and both orders, best match first
- Reads digits spaced, run together or comma-separated
- Shows the square in use and reports characters it can't encode

## Use cases

- Solving a CTF or puzzle-hunt clue made of two-digit numbers
- Checking a Polybius step inside a Bifid, Nihilist or ADFGVX puzzle
- Teaching how fractionating ciphers turn letters into coordinates

## How to use it

1. **Paste the numbers** — Two digits per letter, spaced, run together or comma-separated.
2. **Add the key if there is one** — A keyed square puts the key's letters first. Without a key the standard square is used.
3. **Read the best match** — Every square and both coordinate orders are tried and ranked by how English they look. Spaces aren't encoded, so words run together.
4. **Encode your own** — Switch to Encode, pick the square and order, and copy the numbers.

## When to use it, and when to use something else

- **vs A single-square online decoder** — use Polybius Square Cipher when you don't know whether the puzzle merged I/J or C/K, used a 6×6 square, or wrote column before row. Use A single-square online decoder when you already know the exact square and just need the lookup.
- **vs Decoding by hand from a printed grid** — use Polybius Square Cipher when the message is more than a few letters, or you need to try several squares. Use Decoding by hand from a printed grid when you want to understand the cipher by working it yourself.

## Frequently asked questions

### How does the Polybius square cipher work?

The alphabet is written into a 5×5 grid, row by row, and each letter is replaced by its row number and column number. In the standard square A is 11, B is 12 and T is 44, so BAT becomes 12 11 44. Decoding reverses it: split the digits into pairs and look each pair up.

### Why are I and J in the same cell?

Because a 5×5 grid has 25 cells and the Latin alphabet has 26 letters, so two must share. I and J are the usual pair — J is rare and was long treated as a form of I. Some squares merge C and K instead, as the tap code does, and a 6×6 square avoids the problem while adding the digits 0 to 9.

### How do I decode a Polybius square without the key?

If it's unkeyed, try the standard squares in both coordinate orders — this tool does that automatically and ranks the readings by how English they look. If the square was reordered with a key, the numbers alone can't reveal it; you need the key, or a frequency analysis, since a keyed square is still a simple substitution.

### What is a keyed Polybius square?

A square whose alphabet is reordered by a keyword or phrase: the key's letters go first, without repeats, and the rest of the alphabet follows in order. With the key "polybius cipher" the first row is P O L Y B. It's still a one-for-one substitution, so it's no stronger against frequency analysis, but it can't be read with the standard grid.

### Which ciphers use a Polybius square?

Several. The tap code is a Polybius square sent by knocking. The Bifid cipher writes the coordinates out and recombines them; the Nihilist cipher adds a key's coordinates to the message's; and the German ADFGX and ADFGVX ciphers of 1918 labelled the rows and columns with those letters, then transposed the result.

## Related tools

- https://offlineutils.com/tap-code
- https://offlineutils.com/bacon-cipher
- https://offlineutils.com/baudot-code
