Playfair Cipher Encoder & Decoder
The digraph cipher with a 5×5 keyed square.
About this tool
Playfair, invented in 1854, was the first cipher to encrypt letter pairs (digraphs) rather than single letters, which flattens the frequency signature that breaks simple substitution ciphers. A keyword fills a 5×5 grid (I and J share a cell), and each pair of plaintext letters is transformed by the rectangle, row, or column rule.
It saw real military use through both World Wars because it needs no equipment — just the grid in your head. This tool builds the key square live and encrypts or decrypts with the standard rules, entirely in your browser.
Like everything on encrypt.tools, this runs entirely in your browser — nothing you enter is transmitted or stored.
Frequently asked questions about Playfair Cipher
Why do I and J share a cell in Playfair?+
The alphabet has 26 letters but a 5×5 grid holds only 25, so Playfair merges I and J into one cell. When decrypting, context tells you which letter was intended.
What are the X's in my output?+
Playfair can't encrypt a pair of identical letters, so an X (or another rare letter) is inserted between them, and a trailing X pads an odd-length message. When decrypting, you remove padding X's by reading for sense.
Is Playfair secure today?+
No — it's a historical cipher, breakable by analyzing digraph frequencies with enough ciphertext. It's excellent for learning and puzzles, not for protecting real information.
Related tools
Caesar Cipher
Shift cipher with instant all-25 bruteforce
VIGENÈRE · POLYVigenère Cipher
The polyalphabetic cipher that resisted breaking for 300 years
ATBASH · AFFINEAtbash & Affine
Mirror-alphabet and modular substitution ciphers
RAIL FENCE · ZIGZAGRail Fence Cipher
Zigzag transposition across configurable rails