Playfair Cipher Demo

EDUCATIONAL DEMONSTRATION ONLY — The Playfair cipher encrypts pairs of letters (digraphs) using a 5×5 grid of the alphabet (I/J share a cell). Invented by Charles Wheatstone in 1854, it was named after Lord Playfair. It was the first practical digraph substitution cipher.

Privacy: this tool processes your data entirely in your browser. Nothing you paste or type is sent to the server.

Letters only. J is treated as I.

Alphabetic keyword to build the 5×5 grid.

Result

Enter your values and press Calculate — the result appears here.

Worked examples

Encrypt INSTRUMENTS with MONARCHY

  • text = INSTRUMENTS
  • key = MONARCHY
  • mode = encrypt

Result: GATLMZBRTLSE

Frequently asked questions

Why encrypt letter pairs instead of individual letters?

Encrypting digraphs eliminates single-letter frequency patterns, making frequency analysis harder than with monoalphabetic ciphers.

How are double letters handled?

If a pair has the same letter (e.g., LL), an X is inserted between them. If the text has an odd number of letters, X is appended.

💬 Discuss on BestWordz Community

Join the conversation about Cybersecurity, playfair cipher, digraph cipher on the BestWordz Community forum.

Visit Forum →
Copied!