Skip to main content
PixelTools

Polybius square cipher

Turn text into Polybius square number pairs, or decode them back. Free, private — nothing leaves your device.

0 characters
Number pairs0 characters
Your Polybius result will appear here.

Everything you need to read a Polybius square

Both directions

Switch between text to numbers and numbers to text without leaving the page.

Live results

The result updates as you type. No button to press.

Flexible number input

Paste pairs separated by spaces or run together, like 2315313134. Both decode the same.

100% private

Runs entirely in your browser. Nothing you type is uploaded or stored.

Encode or decode in three steps

  1. 1

    Pick encode or decode

    Choose Encode to turn text into number pairs, or Decode to turn number pairs back into text.

  2. 2

    Type or paste your text

    Each letter becomes its row and column in the 5x5 square, so A is 11 and Z is 55. For decoding, paste the pairs with or without spaces.

  3. 3

    Copy or download the result

    The result updates live. Copy it, download it as a .txt file, or use swap to run it back the other way.

Built for learning, puzzles, and quick checks

The Polybius square is an ancient way to turn letters into numbers. It's a staple of puzzles and tap codes, not a way to protect secrets.

Learning ancient cryptography

See the square Polybius described around 150 BC turn a message into numbers.

Puzzle hunts and escape rooms

Number pairs made of 1 to 5 are a classic Polybius clue. Paste them and read the message.

Checking homework

Verify a hand-worked square instead of counting rows and columns.

Tap codes and prison knocks

The same grid underlies the tap code, so you can see how knocks map to letters.

Frequently asked questions

What is the Polybius square cipher?

+

It's a cipher that writes the alphabet into a 5x5 grid, with rows and columns numbered 1 to 5. Each letter is replaced by its row number then its column number, so A is 11, B is 12 and Z is 55. It's named after the Greek historian Polybius.

How do I decode a Polybius square?

+

Switch to Decode and paste the number pairs. Each two-digit pair is a row then a column, which points to one letter in the grid. For example 23 is row 2, column 3, which is H.

Why are I and J the same?

+

A 5x5 grid has 25 cells but the alphabet has 26 letters, so I and J share one. When decoding, you tell them apart from context, for example 24 could be either letter.

What does the / mean?

+

It marks a space between words, since the grid has no cell for a space. Other punctuation and digits can't be carried and are left out.

What if my numbers include 0, 6, 7, 8 or 9?

+

They aren't valid, because the square only uses the digits 1 to 5. The tool tells you which digit is the problem. Some puzzles use a different grid or a keyword-mixed square, which this tool doesn't cover.

Is the Polybius square cipher secure?

+

No. It's a fixed substitution, so the same letter always gives the same numbers and frequency analysis breaks it. It's for puzzles and learning only.

Is my text uploaded anywhere?

+

No. Everything runs in your browser, and nothing you type is sent to a server.

Try the Polybius square cipher now

Free, no account needed.