Ciphers · PlayfairPlayfair Cipher 5×5

The Playfair cipher encrypts pairs of letters, not single letters, using a square built from a keyword. It works with the Latin alphabet (a 5 × 5 square) and the Russian one (a 4 × 8 table). For every pair we show the rule and highlight the cells, and you can step through pairs one by one — handy for a lesson.

Everything runs in your browser — the text goes nowhere

01Cipher02How it works03Questions04Related
01

Cipher

the text is split into pairs, each pair goes through the square
Table
Keyword
Filler
Text
Result
13 pairs
BMODZBXDNABEKUDMUIXMMOUVIF
Square · 5 × 5, I = J
PLAYF
IREXM
BCDGH
KNOQS
TUVWZ
text pairresult
Step by step · pair 1 of 13
pairs with a filler
HIBMrectangle
The letters are in different rows and columns — take the rectangle's corners: each letter stays in its row and moves to the other's column.
02

How it works

A keyed square

PLAYF IREXM …

The keyword letters without repeats fill the first cells, the rest follow in alphabetical order. In the Latin square I and J share a cell; in the Russian table Ё is written as Е.

Letter pairs

HI DE TH EG …

The text is split into pairs. A filler separates equal letters in a pair and completes an odd last pair.

Three rules

row · column · corners

In one row take the letters to the right, in one column the ones below, otherwise the opposite corners of the rectangle. Decryption goes the other way.

03

Frequently asked questions

Split the text into pairs and find both letters in the square. In the same row, replace each with the letter to its right; in the same column, with the letter below; the count wraps around the edge. Otherwise the letters mark corners of a rectangle, and each moves to the other corner in its own row. With the key “playfair example”, HI becomes BM.

Updated