Checkerboard Polybius Variant Tool

Pick a mode, set a keyword and enter text to encode or decode.

Result

33 12 35 35 15 14 15 21 35 22

How it is calculated

The tool builds a 5×5 grid of 25 letters. The keyword goes in first, letters in order of appearance with repeats removed, and the rest of the alphabet follows. J is merged into I, so there is no J in the grid, and anything in the keyword that is not a letter A–Z is ignored. Row and column numbers run from 1 to 5. Encode replaces each letter with its two-digit code, row·10 + column, separated by spaces; case does not matter. Characters that are not A–Z, such as spaces, digits, punctuation and accented letters, are dropped without warning, so word breaks are lost. Decode reads the digits two at a time, spaces or not, and turns each valid pair back into a letter; pairs with a digit outside 1–5 are skipped. Both sides must use the same keyword.

Worked example

Keyword KEYWORD gives the grid KEYWO / RDABC / FGHIL / MNPQS / TUVXZ. Encode "Hello World", spaces ignored. H is in row 3, column 3, so 33. E is in row 1, column 2, so 12. L is row 3, column 5, so 35, and the second L is 35 again. O is 15, W is 14, O is 15, R is 21, L is 35 and D is 22. The tool prints 33 12 35 35 15 14 15 21 35 22. Switching to decode with the same keyword turns these pairs back into HELLOWORLD.

Try this example →

Common mistakes

  • Expecting spaces, digits or punctuation to survive. They are removed during encoding, so decoding gives continuous letters with no word breaks and no digits.
  • Decoding with a different keyword or none. The same digits mean different letters in every keyed grid, so the output is nonsense unless both sides share the keyword.
  • Forgetting that J and I share a cell. A decoded word may show I where the original had J, so JUMP can come back as IUMP.
  • Typing digits 0, 6, 7, 8 or 9 in a pair when decoding. The grid only has coordinates 1 to 5, and such pairs are silently skipped, which loses letters.
  • Putting numbers or symbols in the keyword and expecting them in the grid. Only the letters A to Z count; a keyword such as "KEY2" acts as KEY.

About this calculator

This tool implements a keyed Polybius square, a checkerboard cipher that arranges a keyword-mixed alphabet into a 5×5 grid of 25 letters (J is merged into I), then represents every letter as a row-column digit pair — for example, with the keyword scrambling the alphabet first, the letter at row 3, column 2 becomes “32”. Encoding replaces each letter of your message with its coordinate pair; decoding reverses the lookup, reading the digit pairs 11 to 55. Only the letters A–Z are encoded: spaces, digits, punctuation and accented letters are dropped, so there is no 6×6 grid with digits.

The Polybius square dates to ancient Greece as a signaling system but became a building block of more advanced classical and field ciphers — it underlies the WWI-era ADFGVX cipher and is a staple exercise in cryptography courses. Puzzle and ARG (alternate reality game) designers, cryptography students, and hobbyist cipher enthusiasts use a keyed variant like this one because the keyword scrambles the letter-to-grid mapping, making the cipher harder to crack than the standard unkeyed square without needing anything more than a shared keyword.

Was this helpful?

You can pick up to 3 reactions.

Comments

  • Be the first to comment.

Popular calculators

All Calculators