Playfair cipher decoder
Turn Playfair cipher text back into plain text when you know the key, for cipher puzzles. It is a puzzle cipher, not protection.
Loading the tool…
Processing and privacy: The result is calculated inside your browser and your data is not sent to any server.
How to use it
- Enter encoded text and key.
- The result appears straight away and updates as you edit.
- Copy the result, or copy a link that keeps the same values to share it.
How it is calculated
The square is built from the key, then for each pair: same row: letter to the left; same column: letter above; otherwise: the rectangle corners on the same row.
Example
Inputs: Key = PLAYFAIR EXAMPLE. Result: Decoded text: HIDETHEGOLDINTHETREXESTUMP.
BM OD ZB XD NA BE KU DM UI XM MO UV IF
HIDETHEGOLDINTHETREXESTUMP
Limits and caveats
- This is a puzzle and teaching cipher that is easy to break, so never use it to protect passwords or sensitive data.
- Filler X or Q letters remain in the result; remove them where they make no sense.
- I appears in place of J, and the original spaces are lost.
Questions about this tool
Why are there extra X letters in the result?
They were added during encoding to split doubled letters or pad the last pair, and cannot be removed automatically with certainty.
Why do I get an error about letter count?
Playfair text is made of pairs, so an odd count means a letter is missing or extra.
Does the key order matter?
Yes. The key must match the one used to encode, because its order sets the square.
