Vigenère cipher

The Vigenère cipher shifts each letter of the text by the corresponding letter of a repeating keyword. Enter your text and a key, then choose encrypt or decrypt. Letters keep their case; spaces and punctuation are left unchanged.

Break without the key

Paste Vigenère ciphertext with an unknown key and the solver recovers it by trying every key length and scoring candidate decryptions against English bigram statistics. It needs roughly four times as much text as the key is long.

About the Vigenère cipher

The cipher was first described by Giovan Battista Bellaso in 1553 but was later misattributed to Blaise de Vigenère, whose name stuck. Each letter of the plaintext is shifted by the corresponding letter of a keyword that repeats for the whole message: with key LEMON, the plaintext ATTACKATDAWN becomes LXFOPVEFRNHR. Because the same plaintext letter can encrypt to many different ciphertext letters, simple frequency counting fails against it.

For three centuries it was known as le chiffre indéchiffrable, the unbreakable cipher. Friedrich Kasiski published the first general attack in 1863: repeated words in the plaintext that happen to line up with the same part of the key produce repeated fragments in the ciphertext, and the distances between them reveal the key length. Once the key length is known, the message splits into ordinary Caesar ciphers, one per key letter.

The solver on this page uses a stronger, modern method: it tries every key length, finds the most English-looking key for each by scoring letter-pair statistics, and reports the best result. It typically recovers the key from ciphertext only four times as long as the key itself.