Skip to main content
Substitution ciphers100% FreeInstant

Polybius Square Cipher: Letters to Grid Coordinates

This free Polybius square tool writes each letter as two numbers, its row and its column in a 5 by 5 grid. It decodes number pairs back into text and can build the grid from a keyword.

By Debmedia Technologies LLP · Kolkata, India · Updated

What Is It and When Do You Need It?

The Polybius square turns a message into coordinates. The same idea lies behind tap codes used by prisoners and in many modern puzzle ciphers. Every letter becomes a pair of digits from 1 to 5.

Choose a direction, add a keyword if you wish, and read the grid.

How to Use This Tool

  1. Type text or paste number pairs.
  2. Choose the direction.
  3. Optionally enter a keyword.
  4. Press Run and see the result and the grid.

How the Calculation Works

The grid is filled row by row with the alphabet, without J (J is written as I). With a keyword, its unique letters go first. Each letter is replaced by the digit of its row and the digit of its column. Decoding looks up the cell for each pair of digits.

Worked Example

With the plain alphabet grid, HELLO becomes 23 15 31 31 34.

Common Uses

  • Puzzles and escape rooms.
  • Teaching ciphers.
  • Tap codes.
  • History of cryptography.

Tips and Common Mistakes

  • I and J are the same cell.
  • Digits and punctuation are skipped when encoding.
  • A keyword makes the square harder to guess.

Next, you may need the A1Z26 cipher, Bacon cipher, Playfair cipher, rail fence cipher.

Everything runs in your browser. Nothing you type is uploaded, stored or sent to any outside service.

Frequently Asked Questions

A 5 by 5 grid holding the alphabet. Each letter is replaced by its row number and column number. I and J share one cell to fit 25 squares.
The ancient Greek historian Polybius described it as a way to signal letters with torches, about 150 BC.
Yes. The keyword letters go in first, then the rest of the alphabet, which changes the grid.
Paste number pairs such as 23 15 31 31 34. Spaces are optional.

Disclaimer: results are calculated in your browser from the numbers you enter. Check important results before you rely on them for money, health, safety or legal decisions.