Two-square cipher
Encrypt or decrypt letter pairs with two keyed Polybius squares.
Two-square cipher
The two-square cipher, also called double Playfair, encrypts text two letters at a time with a pair of keyed 5×5 grids instead of Playfair's single grid. Each grid holds a keyword's letters followed by the rest of the alphabet, and every letter pair is swapped for the cell at the crossing point of its two positions. Paste a message, set a key for each square, and this tool encrypts or decrypts it instantly in your browser.
Left square key and Right square key seed the two grids — leave both blank for two plain, unkeyed alphabets. Direction switches between encrypting and decrypting, with a swap button that feeds the output back in as input for a one-click round trip. Merge I and J into one cell keeps the classic 25-letter grid, since a full A-Z can't fit 5×5; turn it off and a stray J is skipped instead. Switch Alphabet to Custom for your own unique characters — any perfect-square count works, from 4×4 up to 6×6 mixing letters and digits.
Preserve spaces and punctuation keeps the layout, substituting only letters; turn it off for a dense block of paired ciphertext. Preserve letter case carries each letter's case onto its replacement, so a capitalized word still reads that way once decrypted. Show the two squares prints both grids under the result, handy for checking a key by hand. Brute-force common keys tries common English keywords instead of your own, ranking results by how English they read — a dictionary attack, not an exhaustive search, since no browser could search a real key space.
Everything runs locally: your text and keys stay on your device and are never uploaded. Copy the result, download it as a .txt file, or send the output into the input to chain another tool.