Encrypt and decrypt text with the Playfair digraph cipher using a keyword and a 5x5 square. Runs entirely in your browser.
Supported Tools:
I and J share a cell; the alphabet fills a 5x5 square.
Encrypt and decrypt text with the Playfair digraph cipher using a keyword and a 5x5 square. Runs entirely in your browser.
Playfair, invented in 1854 and promoted by Lord Playfair, was the first practical cipher to encrypt pairs of letters rather than single ones. That made it far stronger than simple substitution for its time, and it saw real military use. This tool builds the key square from your keyword and encrypts or decrypts text two letters at a time.
Input:
HIDE THE GOLD IN THE TREE STUMP (key PLAYFAIR EXAMPLE)
Output:
BMODZBXDNABEKUDMUIXMMOUVIF
Why do I and J share a cell?
The alphabet has 26 letters but the square holds 25, so I and J are merged. Decrypted text shows I where a J was.
Why do extra X letters appear?
Playfair cannot encrypt a doubled letter in a pair, and needs an even length, so X is inserted to separate doubles and pad the final letter.
Is Playfair secure?
No. It is breakable with enough ciphertext and modern analysis. Treat it as historical and educational.
Does my text leave the browser?
No. Everything runs locally in your browser.