Caesar Cipher Decoder

Playfair cipher decoder

Decoded message

Key square and letter pairs: pick a pair to see its rule

What is a Playfair cipher decoder

A Playfair cipher decoder reads a message that was coded two letters at a time. Both letters come from a 5×5 square built from a keyword. I and J share one cell, so 25 cells hold the whole alphabet.

Charles Wheatstone invented the cipher in 1854, and his friend Lord Lyon Playfair promoted it, so it carries his name. British forces used it in the Second Boer War and the First World War. In 1943, a Playfair message helped bring John F. Kennedy's PT-109 crew home.

Coding pairs hides single-letter patterns, which makes Playfair much harder to crack than a Caesar shift.

Type a keyword and watch the square fill

Teal: keyword letters, with repeats dropped. Plain: the rest of the alphabet in order.

How to decode a Playfair cipher by hand

  1. Build the square from the keyword.
  2. Split the coded text into pairs.
  3. Same row: take the letter to the left of each.
  4. Same column: take the letter above each.
  5. Otherwise: the pair marks two corners of a rectangle. Swap each letter for the corner in its own row.
  6. Drop any filler X that splits a double letter or pads the end.

Playfair cipher examples

All three use the keyword PLAYFAIR EXAMPLE. Tap Try to load one into the decoder above. The X in the second example pads the last pair.

CodedPlain
IXIVIXPVOQQOMeet me at noon
BMODZBXDNAGEHide the gold (X)
OIIABPOMNCIVKeep it secret