Playfair Cipher
Encrypt and decrypt messages using the Playfair cipher — a digraph (letter-pair) substitution cipher based on a 5×5 keyword grid.
What Does This Tool Do?
The Playfair cipher encrypts pairs of letters (digraphs) using a 5×5 keyword grid — making it significantly harder to crack than simple single-letter substitution ciphers. The key square is shown so you can follow the encryption.
Key Features
5×5 Key Square
Visual grid shown with your keyword.
Digraph Cipher
Encrypts letter pairs, not individual letters.
Both Directions
Encrypt and decrypt with same keyword.
Copy Result
One-click copy.
How to Use
- Enter your message (J is treated as I).
- Enter a keyword.
- Click Encrypt or Decrypt.
- The key square is shown alongside the result.
Frequently Asked Questions
How does Playfair work?▾
The keyword fills a 5×5 grid (I=J). Letters are encrypted in pairs: same row → shift right, same column → shift down, otherwise → swap columns within respective rows.
Why is J treated as I?▾
The alphabet has 26 letters but the grid has only 25 cells. I and J are combined (they were historically interchangeable), keeping the grid to 5×5.
Why is Playfair harder to crack than Caesar?▾
It encrypts digraphs (pairs), so simple letter frequency analysis fails. You need digraph frequency analysis, making it around 600x harder than a monoalphabetic cipher.