Polybius Square Cipher
Encode and decode messages with the Polybius square cipher.
Result
How it is calculated
The 5×5 grid holds the alphabet row by row with I and J sharing one cell: row 1 is A B C D E, row 2 F G H I/J K, row 3 L M N O P, row 4 Q R S T U, row 5 V W X Y Z. To encode, each letter is replaced by its row and column digits (both from 1 to 5), and the pairs are separated by spaces. J is treated as I. Anything that is not an A–Z letter (spaces, digits, punctuation, accented letters) is skipped. To decode, every two consecutive digits are read as row and column; pairs containing a digit outside 1–5 are ignored. Decoding returns capital letters, so J cannot be recovered.
Worked example
Encode HELLO. H is in row 2, column 3, giving 23. E is row 1, column 5, giving 15. L is row 3, column 1, giving 31 (twice). O is row 3, column 4, giving 34. Result: 23 15 31 31 34.
Common mistakes
- Expecting the letter J to survive; it is encoded as I, so decoding gives I.
- Using the cipher for real security; it is a simple substitution and is broken at a glance with letter frequencies.
- Typing digits or accented characters in encode mode and expecting them in the output; they are dropped.
- Decoding with the mode left on encode, or entering digit pairs that include 0, 6, 7, 8 or 9.
- Reading the pair as column then row; the first digit is the row.
About this calculator
This calculator encrypts or decrypts text with the Polybius square, a classical cipher dating to ancient Greece that arranges the alphabet in a 5×5 grid (I and J typically share a cell) so each letter can be represented by its row and column digits.
Cryptography students and puzzle enthusiasts use it to learn the fundamentals of substitution ciphers and coordinate-based encoding — the same principle later used in more advanced ciphers, like the Polybius-based ADFGVX cipher from World War I.
Was this helpful?
You can pick up to 3 reactions.
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
- Loan Calculator
- Profit Calculator
- Discount Calculator
- BMI Calculator
- Percentage Calculator
- Ideal Weight Calculator
- Age Calculator
- Pregnancy Due Date Calculator
- Compound Interest Calculator
- BMR Calculator (Basal Metabolic Rate)
- Tip Calculator
- Fuel Cost Calculator
- Date Difference Calculator
- Sleep Cycle Calculator
- Daily Water Intake Calculator
- Simple Interest Calculator
- Heart Rate Zones Calculator
- Running Pace Calculator
- Pet Age Calculator
- Calories Burned Calculator
- Macro Calculator
- TDEE Calculator (Total Daily Energy Expenditure)
- Waist-to-Hip Ratio Calculator
- Honor Roll Calculator
- One Rep Max (1RM) Calculator
- Ovulation Calculator
- Electricity Cost Calculator
- Unit Price Calculator
- Savings Goal Calculator
- Break-Even Point Calculator
- Paint Calculator
- Course Grade Average Calculator
- Business Days Calculator
- Time Duration Calculator
- Fuel Economy Calculator
- Temperature Converter
- Tile Calculator
- Aspect Ratio Calculator
- Roman Numeral Converter
- Goal Weight Timeline Calculator
- Salary Converter (Hourly to Annual)
- Credit Card Validator (Luhn)
- Body Surface Area (BSA) Calculator
- Feels-Like Temperature Calculator
- Ohm’s Law Calculator
- PPI (Pixel Density) Calculator
- Molar Mass Calculator
- Zodiac Sign Calculator (Western + Chinese)
- IBAN Validator
- Shoe Size Converter
- Country Info & Dialing Code Lookup
- Time Zone Difference (World Clock)
- CAGR (Compound Annual Growth Rate) Calculator
- Rule of 72 Calculator
- Blood Alcohol Content (BAC) Calculator
- Lean Body Mass (LBM) Calculator
- Pythagorean Theorem Calculator
- Speed Converter
- Download Time Calculator
- Date Calculator (Add/Subtract)
No calculators found
Comments (1)
This is a classic puzzle cipher, not real security, since every letter always maps to the same pair of digits. The 5 by 5 grid has no J, so J is encoded as I and cannot be told apart on decoding. Anything that is not a letter, including digits, accents and punctuation, is skipped while encoding, so Turkish letters such as ş or ı will be left out. Planning a puzzle or a game? Tell us which alphabet you would want supported.