All tools

Playfair Cipher

Encrypt or decrypt using the Playfair pair-substitution cipher.

P
L
A
Y
F
I
R
B
C
D
E
G
H
K
M
N
O
Q
S
T
U
V
W
X
Z
Result
KGYVRVVQGRCZ

The grid drops the letter J and merges it into I, which is standard for Playfair. Identical letters in a pair get split with an X, and odd length plaintext is padded with an X. Spaces and punctuation are stripped before encryption.

About

Playfair encrypts pairs of letters using a 5x5 grid built from a keyword. Used by the British Army in WWI. More secure than Caesar but breakable with frequency analysis on bigrams.

How to use

  1. Enter a keyword.
  2. Enter your text.
  3. Toggle encrypt or decrypt.

FAQ

How does the 5x5 grid work?+

The keyword fills the grid first (no repeats), then the rest of the alphabet. I and J share a cell. Encryption rules depend on whether pair letters are in the same row, column, or rectangle.

Is Playfair secure?+

No. Hand-cracked in WWI. Bigram frequency analysis breaks it within a few hundred characters. Useful for puzzles and history, not real secrets.