Playfair cipher
Encrypt or decrypt text with the classic Playfair cipher, using a keyword-built 5×5 letter table.
Playfair cipher
The Playfair cipher is a classical encryption method from 1854 that enciphers pairs of letters rather than single characters, making it far harder to break with simple frequency analysis than a Caesar or substitution cipher. This tool builds a 5×5 letter table from your keyword, splits your text into letter pairs and encrypts or decrypts each pair with the row, column and rectangle rules the cipher is known for — useful for cryptography lessons, puzzle hunts, CTF challenges or exploring how a pre-computer cipher works.
Type a keyword to seed the table; its letters come first, followed by the rest of the alphabet. Since the table has 25 cells, choose whether to merge I and J into one cell (the traditional approach) or drop Q entirely. Pick a direction, a filler letter used to split a doubled letter and pad a trailing odd one (defaulting to X, with an automatic fallback), and whether diacritics are folded to plain Latin so accented text becomes cipherable, or excluded instead. The output can be grouped into blocks of five characters or left continuous.
Spaces, digits and punctuation are removed before pairing, since Playfair needs a continuous run of letters. A doubled letter inside a pair (the two L's in "BALLOON") gets a filler inserted between them, and an odd-length message gets one appended at the end; decrypting recovers those fillers as ordinary output, since there is no reliable way to tell them apart from real letters afterwards. Turn on "Show table and letter pairs" to see exactly how your text was split, or off for just the result.
Everything runs locally in your browser — your keyword and text are never uploaded. Copy the result, download it as a .txt file, or send it back into the input to chain another transformation.