ToolPuma Logo

Playfair Cipher

Encrypt or decrypt text with the Playfair digraph cipher.

Note: The Playfair cipher encrypts pairs of letters (digraphs) using a 5x5 square built from a keyword. It merges I and J, inserts an X filler for repeated or trailing letters, and is not secure for modern use.

What Is a Playfair Cipher?

The Playfair Cipher tool encrypts and decrypts text using a 5x5 digraph (pair-of-letters) substitution built from a keyword. It was the first practical digraph cipher and was used by the British in World War I.

How to Use This Playfair Cipher

  1. 1
    Enter KeywordType a word used to build the 5x5 square.
  2. 2
    Enter TextType the plaintext or ciphertext.
  3. 3
    Choose DirectionClick Encrypt or Decrypt to transform the text.

Frequently Asked Questions

The keyword fills the square first, then the remaining alphabet letters. Because there are 26 letters but only 25 cells, I and J share a cell. Pairs are encrypted by shifting along rows, columns, or rectangle corners.
Repeated letters in a pair (like 'LL') and an odd final letter get an 'X' inserted so every pair is distinct, which the cipher requires.