Choose language

PL, EN, ES, DE, FR, RU


Playfair cipher - online encoder / decoder


Playfair cipher online encoder and decoder. Encrypt and decrypt any cipher created in a Playfair cipher.

The Playfair cipher or Playfair square is a polygraphic substitution cipher. The cryptogram is created by replacing the plaintext letter pairs with another letter pair. With our encoder you can both encrypt and decrypt any text with Playfair cipher. Due to the fact that there are 26 letters of the Latin alphabet and there are 25 in the table, choose whether you want to replace a letter with another letter (usually J-> I) or remove a letter from the table (e.g. the least used one). Select whether you want to use a code table with the entered key for encryption, or whether you want to fill in each field of the table manually or randomly. If you choose encryption with a key, enter the key in the appropriate field. If you choose to fill in by hand or in random then enter letters into the code table yourself or fill in random table. You can separate repeated letters with one of the letters of the alphabet.





Playfair cipher - encoder / decoder


Code table


Use a table with a key:

Filling manually or randomly:


Replace letter:
Replace to
Skip letter:
Skip:


Do not separate duplicate letters.







Have you counted? - like and share









Playfair cipher - encoder / decoder


The Playfair cipher, Wheatstone-Playfair cipher, or Playfair square is a polygraphic substitution cipher. It was invented in 1854 by the English inventor Charles Wheatstone. It was popularized by the Scottish scientist and parliamentarian Lord Lyon Playfair.

Playfair has been trying for many years to use this cipher in war. His idea was repeatedly opposed. The British Ministry of War finally used it during the Boer War. It was then used by all warring parties during both world wars. Like other ciphers of this period, with the advent of the computer age, it was withdrawn from use due to the possibility of breaking with the use of brute force attacks, finding the most common digrams in a given language.

Encoding with Playfair cipher replaces the plaintext letter pairs with another letter pair.

It consists of a code table with 25 letters of the Latin alphabet. Due to the fact that the Latin alphabet contains 26 letters, the one letter that is least used in the alphabet is removed or the letters are used alternatively (eg I instead of J). We also enter a keyword or keywords into the table. The repeated letters are removed. We fill the rest of the table fields with the remaining letters of the alphabet in alphabetical order.

For example, setting the keyword as KLUCZ and removing the letter Q, the code table would look like this:

K L U C Z
A B D E F
G H I J M
N O P R S
T V W X Y

To encrypt the plaintext, we divide it into digrams consisting of pairs of letters. If the explicit word does not have an even number of letters, then at the end we add the letter X. If there are the same letters in a pair, we separate them also with the letter X. For example, if we want to encode the word CALCOOLATOR , we divide them into pairs CA LC OX OL AT OR . We added an X between the letters OO to separate a pair of the same letters.

Then we find the first pair of letters CA

K L U C Z
A B D E F
G H I J M
N O P R S
T V W X Y

Now we read letters from the intersection of lines drawn vertically and horizontally from each open letter.

K L U C Z
A B D E F
G H I J M
N O P R S
T V W X Y

The first encoded letter pair of CA of the plaintext will be KE .

If a pair of letters appear on the same line, then for each open letter we read the letter immediately to its right. If, however, a pair of letters appear in the same column, then for each open letter we read the letter directly below it. An example here is another pair of letters LC of our word, located on the same line of the code table, which after encoding looks like UZ.

K LUCZ
A B D E F
G H I J M
N O P R S
T V W X Y

We repeat the reading operation for each of the pairs of clear word letters CA LC OX OL AT OR and assign it pairs read from the code table KE UZ RT PK GK PS.


More on: Wikipedia - Playfair cipher


Users of this calculator also used

Affine cipher - encoder / decoder

Affine cipher online encoder and decoder. Encrypt and decrypt any cipher created in a Affine cipher.

Vigenère cipher - encoder / decoder

Vigenère cipher online encoder and decoder. Encrypt and decrypt any cipher created in a Vigenère cipher. You can use any shift and additionally a key for more precise text encoding.

Four-square cipher - encoder / decoder

Four-square cipher online encoder and decoder. Encrypt and decrypt any cipher created in a Four-square cipher. You can use any shift and additionally a key for more precise text encoding.

Vernam cipher - encoder / decoder

Vernam cipher online encoder and decoder. Encrypt and decrypt any cipher created in a Vernam cipher.

Fraction calculator - subtracting fractions step by step with explanation

With the Fractions Calculator, you can subtract any two mixed numbers or proper and improper fractions.
Fractions Calculator will show you the result of operations on fractions step by step and will give you explanations of the operations performed to subtracting fractions. You will learn how to simplify fractions, how to find a common denominator, how to find the least common multiple and the greatest common divisor.

Rail Fence, Zig-Zag - encoder / decoder

Rail Fence, Zig-Zag cipher online encoder and decoder. Encrypt and decrypt any cipher created in a Rail Fence, Zig-Zag cipher.



Online calculator