Toolstia / Polybius square cipher

Polybius square cipher

Replace each letter with two numbers that give its row and column in a 5 by 5 square, or turn number pairs back into letters. A keyword changes the layout of the square.

The square

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

I and J share one cell. A keyword moves its letters to the front of the square.

How it works

  1. Choose letters to numbers or numbers to letters.
  2. Add a keyword if you want one.
  3. Paste your text and copy the result.

The square

The alphabet is written in five rows of five. I and J share a cell. Each letter is replaced by its row number followed by its column number.

Using a keyword

A keyword is written first, without repeated letters, and the rest of the alphabet follows. Both sides must use the same keyword.

Word breaks

Words are separated by three spaces in the numbers. Keep them to keep the word breaks when decoding.

History

The square was described by the ancient Greek writer Polybius and was used for signalling and prison tapping codes.

Questions

What happens to J?

J is treated as I, so decoding gives I. Everything happens in your browser, and nothing you enter is sent anywhere.

Are digits and punctuation kept?

No. Only letters are encoded.

Why does decoding show a question mark?

A pair used a number outside 1 to 5, so no letter matches it.