Converters & translators

Polybius Square Cipher Decoder & Encoder

Decode and encode the Polybius square cipher, which turns each letter into its row and column in a 5×5 grid (I and J share a cell).

Updated · Free, no sign-up

Encoded
23 15 31 31 34 52 34 42 31 14

Share this tool

Know someone who’d love it?

What is the Polybius square?

The Polybius square lays the alphabet out in a grid of five rows and five columns and writes each letter as two digits: its row and then its column. A sits in row 1, column 1, so it is 11; H is in row 2, column 3, so it is 23. The whole word HELLO becomes 23 15 31 31 34.

The alphabet has 26 letters and the grid has 25 cells, so two letters have to share. In the standard English square, I and J share a cell. The idea goes back to the Greek historian Polybius, which is why it is also called the Polybius cipher, the Polybius checkerboard, or simply the 5×5 grid cipher.

How to use the Polybius square decoder and encoder

  1. Choose Encode to turn letters into number pairs, or Decode to turn pairs back into letters.
  2. Type your message, or paste the numbers. Each letter is a pair of digits from 1 to 5, written with a space between pairs.
  3. Tap Copy to save the result. The grid view in the tool shows the row and column of each letter, so you can follow the steps.

If you are not sure your numbers are a Polybius square at all, check the digits: if every digit is between 1 and 5 and the total count is even, it probably is. The tool’s cipher helper can make that guess for you.

Polybius square chart

The Polybius square: every letter becomes its row and its column.

The Polybius square grid

This is the standard square used by the tool, with the rows numbered down the side and the columns across the top. Read the row first, then the column.

Polybius square: the letter at each row and column of the 5×5 grid
Row12345
1ABCDE
2FGHI/JK
3LMNOP
4QRSTU
5VWXYZ

I and J share 24, so JUMP is encoded as if it were spelled with an I: 24 45 32 35. When you decode, read 24 as whichever letter makes a word. Some squares merge C and K instead and keep J; the tap code uses that version.

Polybius square chart: every letter and its number

Polybius square chart: each letter with its row-column number
LetterCodeLetterCode
A11N33
B12O34
C13P35
D14Q41
E15R42
F21S43
G22T44
H23U45
I24V51
J24W52
K25X53
L31Y54
M32Z55

How to encode with a Polybius square

  1. Write your message in capitals. Change every J to I.
  2. Find each letter in the grid and write its row number, then its column number.
  3. Leave a space between pairs, and a wider gap or a slash between words if you want to keep them.

Encoding FIND THE KEY:

Encoding FIND THE KEY letter by letter
LetterRowColumnCode
F2121
I2424
N3333
D1414
T4444
H2323
E1515
K2525
E1515
Y5454

The message is 21 24 33 14 / 44 23 15 / 25 15 54, with slashes between the words.

How to decode a Polybius square

Split the numbers into pairs, then look up each pair: the first digit tells you the row, the second the column. Take 34 35 15 33 44 23 15 12 34 53:

Decoding a Polybius square message pair by pair
PairsLookupsWord
34 35 15 3334 = O, 35 = P, 15 = E, 33 = NOPEN
44 23 1544 = T, 23 = H, 15 = ETHE
12 34 5312 = B, 34 = O, 53 = XBOX

Three things to know when you solve one:

  • Run-together digits are fine. Every letter is exactly two digits, so 123453 can only be split one way. That is a real advantage over A1Z26, where 1 and 2 can start a one-digit or a two-digit number.
  • Row or column first? Almost every puzzle reads the row first, but a few use column first. If you get nonsense, swap the two digits of every pair. BOX written column first is 21 43 35; swap each pair and you are back to 12 34 53.
  • No word breaks? Decode everything, then look for words in the string of letters. Since I and J share a cell, read each I as J where that makes a word.

Polybius square with a keyword

The standard grid is easy to guess. A keyword square is a little harder: write the keyword first, dropping any letter you have already used, then fill the rest of the grid with the unused letters in order. With the keyword LANTERN the grid starts with L A N T E R:

Polybius square built from the keyword LANTERN
Row12345
1LANTE
2RBCDF
3GHI/JKM
4OPQSU
5VWXYZ

In this square HIDE is 32 33 24 15, while the standard square gives 23 24 14 15. The tool uses the standard grid, so for a keyword square, build the grid on paper like the one above and look the pairs up by hand. Both sides need the same keyword, which makes it a real (if weak) key.

6×6 Polybius square with numbers

A grid of six rows and six columns has 36 cells: room for all 26 letters and the digits 0 to 9, so I and J no longer have to share. The pairs then use the digits 1 to 6. In this layout ROOM 101 is 36 33 33 31 54 53 54.

6×6 Polybius square with the letters A to Z and the digits 0 to 9
Row123456
1ABCDEF
2GHIJKL
3MNOPQR
4STUVWX
5YZ0123
6456789

If a puzzle contains the digit 6, or pairs like 61 to 66, it probably uses a 6×6 square. If no digit is higher than 5, it is a 5×5 square.

Polybius square practice puzzles

Print them as a worksheet or solve them on screen. Check the first two with the decoder. The third uses the keyword square above, which the decoder does not build, so solve that one by hand with the grid.

Puzzle 1 (Easy)

Standard square, one pair per letter.

43 15 13 42 15 44

Show the answer

SECRET

Puzzle 2 (Medium)

Standard square with the spaces removed. Split the digits into pairs first.

4442151143454215

Show the answer

TREASURE

Puzzle 3 (Hard)

A keyword square built from LANTERN (see the grid above).

52 15 11 11 24 41 13 15

Show the answer

WELL DONE

History of the Polybius square

Polybius was a Greek historian of the second century BC. In his Histories he describes a way of sending messages over long distances with torches. The 24 letters of the Greek alphabet were split into five groups of no more than five letters. The signaler raised torches on the left to show which group, and on the right to show which letter of that group, so the receiver could spell out any message rather than choose from a short list of agreed signals. Polybius credits the method to two earlier men, Cleoxenus and Democleitus, and says he improved it.

The grid outlived the torches. Prisoners have long used it as a knocking code, and the tap code used by American prisoners of war in Vietnam is a Polybius square tapped out on a wall. It is also the starting point of stronger ciphers: the Playfair cipher works on a 5×5 keyword square, and the ADFGVX cipher used by the German army in 1918 began with a 6×6 square before scrambling the result a second time.

Polybius square in escape rooms and classrooms

  • Escape rooms: hide the grid somewhere in the room (a tiled floor, a chessboard-like pattern, a 5×5 shelf) and give players number pairs on a note. The two digits can also come from separate clues, such as one from a clock and one from a dial.
  • Classrooms: the square is a good way to practice coordinates and grids. Students encode their names, swap with a partner, and decode each other’s.
  • Puzzle games and hunts: Polybius grids turn up in video games and puzzle hunts, often drawn as a picture with symbols around the edge instead of numbers. Replace the symbols with 1 to 5 and decode as usual.

Is the Polybius cipher secure?

Not on its own. Each letter always becomes the same pair, so it is a simple substitution cipher in disguise. Count the pairs and the most common one is very likely E (15) or T (44); the letter-frequency panel in the tool does that counting for you. A keyword square stops a solver from simply reading the standard grid, but frequency analysis breaks it as well. For a sturdier puzzle, combine it with a second step such as a rail fence on the digits.

Free and private

This Polybius square tool runs entirely in your browser. It is free, needs no sign-up, and nothing you type is uploaded or stored.

For teachers, bloggers & clubs

Put the Polybius Square on your website

Give your readers this tool right on your page. Copy the code, paste it into your site, done: no sign-up, no account.

  • Free for any website
  • No ads, no cookies
  • Fits phones and sidebars
  • Always up to date
See it live ↗

Please keep the small credit line under the tool; you may add rel="nofollow" to its link. How it works & the rules

› Show the code

Frequently asked questions

What is the Polybius square?
The Polybius square is a 5×5 grid of letters that turns each letter into two digits: its row and its column. A is 11, B is 12 and Z is 55. Because the grid has 25 cells, I and J share one.
How do you read a Polybius square?
Read the row first and the column second. In 23, the 2 means row 2 and the 3 means column 3, which is H in the standard grid.
How do you decode a Polybius square cipher?
Split the digits into pairs and look each pair up in the grid: first digit for the row, second for the column. In the tool, choose Decode and paste the pairs with spaces between them.
Why do I and J share a cell in the Polybius square?
The alphabet has 26 letters and the grid only 25 cells, so two letters have to share. I and J is the usual choice; some versions merge C and K instead, as the tap code does.
How do you make a Polybius square with a keyword?
Write the keyword into the grid first, skipping any repeated letters, then fill the remaining cells with the unused letters in alphabetical order. Both sides need the same keyword to read the message.
What is a 6×6 Polybius square?
A 6×6 square has 36 cells, enough for all 26 letters and the digits 0 to 9, so no letters have to share. Its pairs use the digits 1 to 6.
Who invented the Polybius square?
It is named after the Greek historian Polybius, who in the second century BC described a torch-signaling system built on a letter grid. He credited the method to Cleoxenus and Democleitus and said he improved it.
What is the difference between the Polybius square and tap code?
Tap code uses the same 5×5 grid but drops K (tapped as C) and keeps J, and it sends the row and column as groups of taps instead of digits.
Is the Polybius square cipher secure?
No. Each letter always becomes the same pair of digits, so it can be broken by counting which pairs appear most often. It is ideal for puzzles, escape rooms and worksheets.
Is this Polybius square tool free and private?
Yes. It runs entirely in your browser with no sign-up, and nothing you type is uploaded or stored.

About this page

The Polybius Square is a free tool from Linguaholic, made by Marcel Iseli. It runs in your browser, with no sign-up. Last updated .

The code breaker's English letter frequencies and word checks come from Linguaholic’s English dictionary, built from the open ENABLE and SCOWL word lists. Licenses and notices.

Keep exploring

Browse all 99 tools