Code tool

Playfair Cipher

Build a 5×5 Playfair square and transform letters locally. I and J share a cell; filler X separates repeated pairs and completes odd length.

In-browser processingNo account requiredPrivacy details ↗

Only A–Z letters are used; J becomes I. X separates repeated pairs and fills an odd final letter.

A QUICK WALKTHROUGH

How to use this tool

  1. Enter a key and letters.
  2. Choose encrypt or decrypt.
  3. Review the digraph result and the documented filler rules.

Defined classroom rules

The key is normalized to A–Z, duplicates removed, and J merged into I. The remaining alphabet fills the square row by row.

Pair processing

Encryption shifts same-row letters right and same-column letters down; rectangle pairs take the other corners. Decryption reverses those shifts. X is inserted between equal pair letters and appended when needed.

Scope and limits

Only A–Z letters are transformed; other characters are ignored in the cipher stream. This is a historical teaching cipher, not secure encryption.

GOOD TO KNOW

Common questions

What happens to J?

J is normalized to I, so the square has 25 cells.

How is padding removed?

Decryption returns the transformed stream; it cannot know which X characters were original, so inspect or remove filler X manually.

Is this secure?

No. Playfair is for education and demonstrations, not protecting secrets.