Playfair Cipher
Build a 5 by 5 key square, encrypt and decrypt digraphs, and insert X between repeated letters.
Playfair cipher
Key square: not built yet.
How to use the Playfair Cipher
- Type a keyword to build the five by five key square.
- Enter your letters and choose encrypt or decrypt.
- Copy the digraph result, or use it as input to check the round trip.
Features
- Five by five key square built from a keyword
- Digraph rules for rows, columns and rectangles
- Inserts X between repeated letters
- Merges I and J, dropping Q by convention
Advertisement
Frequently Asked Questions
Common questions about the free online playfair cipher.
It encrypts pairs of letters instead of single letters. Each pair is shifted in a five by
five key square, which hides single letter frequencies.
The unique letters of the keyword come first, then the rest of the alphabet in order. The
letter J is merged with I, so only twenty five letters fit.
When a pair holds the same letter twice, an X is inserted between them. On decrypt the filler
is removed again when that option is selected.
The square holds twenty five cells but the alphabet has twenty six letters, so I and J share
one cell. Any J you type is treated as an I.
Letters in the same row shift right, letters in the same column shift down, and a rectangle
swaps columns. Decrypting shifts the other way.
An X is appended to fill the last pair, because the cipher works on two letters at a time.
Decrypting with removal enabled drops that trailing X.
No. Only letters take part in the cipher, so spaces, digits and punctuation are removed
before encryption. Decryption returns letters in upper case.
No. Playfair was strong by hand in the nineteen hundreds, but a computer can break it easily
today. It is best used for puzzles and teaching.
No. The key square and the digraph rules are applied entirely inside your browser, so nothing
is ever sent anywhere.
Yes. The tool is completely free and unlimited, with no account, no sign-up and no data
collection.
Last updated: October 10, 2026