Two-Square Cipher
| E | X | A | M | P |
| L | B | C | D | F |
| G | H | I | K | N |
| O | Q | R | S | T |
| U | V | W | Y | Z |
| K | E | Y | W | O |
| R | D | A | B | C |
| F | G | H | I | L |
| M | N | P | Q | S |
| T | U | V | X | Z |
HECMXWSRKYXPHWNODG
Encode digraphs through two keyword squares
The two-square cipher, also called double Playfair, encrypts pairs of letters through two keyed 5×5 squares. For each plaintext pair, the first letter is located in the top square and the second in the bottom square; the ciphertext keeps each letter in its own square but swaps the two columns. It is stronger than Playfair, which keys a single square, and simpler than the four-square cipher, which uses four.
When to use this tool
Reach for the two-square cipher — also known as double Playfair — when a puzzle, CTF challenge, escape room, or cryptography lesson encrypts letter pairs through two keyword squares. It is the missing middle of the Playfair family: stronger than Playfair, which keys a single square, and simpler than the four-square cipher, which uses four. Stacking two keyed 5×5 squares spreads each digraph across both, so a single square is no longer enough to read the message. It sits naturally beside the Playfair and Four-Square tools, completing the digraph and square family of classical ciphers here.
Privacy and limitations
Everything runs locally in your browser; nothing is sent anywhere. This is a classical cipher, not real encryption — two known keywords make it trivial to reverse. Both squares merge J into I, so I and J share one cell and both decode back to I; encoding is case-insensitive and drops every non-letter before pairing. Output is uppercase letters only, an odd-length message is padded with a trailing X, and original case, spacing, and punctuation are not recovered — a round-trip returns the cleaned, uppercased message (with any padding) rather than your exact input. Both keywords are optional; an empty keyword yields the plain A–Z square. The two-square transform is its own inverse, so the same operation both encodes and decodes — the Encode/Decode toggle simply swaps the sample text.