'Polybius Square' Cypher System

Encrypt or Decrypt text with this ancient Substitution Cypher

The Polybius Square is an ancient Greek cryptographic tool, credited to (and named after) the historian Polybius, that transforms letters into numerical coordinates.
By arranging the alphabet into a 5x5 grid (usually combining "I" and "J" to fit all 26 letters into 25 cells) each letter is represented by a pair of numbers indicating its row and column. For instance, the letter "A" might be expressed as "11" and "B" as "12." This method was revolutionary at the time, because it performed "fractionation": breaking a single character into two distinct components.
Beyond simple encryption, this system is ideal for telegraphy, since it allows messages to be transmitted over long distances using optical signals like torches or flags to represent the corresponding row and column numbers.
(Show/Hide Information Panel)

Usage:

To use this Polybius Square for encoding, first choose (and remember) the style of grid, then click/tap [Generate Encryption Grid]
Click/tap each letter of your message, in turn, within the letter grid that will appear below. For each letter, a pair of numbers will appear below the grid, in blocks of five.
To decrypt, simply reverse the process by choosing the correct style of grid, then click/tap [Generate Decryption Grid]
Click/tap each number-pair of your message, in turn, within the number grid that will appear below. For each pair of numbers, the original letter(s) will appear below the grid, in blocks of five.

Configure The Grid

Grid:

Text: