Vigenère Cipher
Encode and decode text with the Vigenère cipher — a keyword-driven polyalphabetic cipher. Supports the classic repeating-key mode and the text auto-key variant; non-letters pass through and letter case is preserved.
Input
Only letters are used; the keyword repeats over the text.
Output
Output letter frequency
| Letter | Count | Frequency |
|---|---|---|
| No data yet | ||
Guides
What is the Vigenère cipher?
The Vigenère cipher is a polyalphabetic substitution cipher: instead of shifting every letter by the same amount (as the Caesar cipher does), it uses a repeating keyword to shift each letter by a different amount. Each letter of the keyword picks a Caesar shift for the letter beneath it, and the keyword repeats over the whole message. Because the same plaintext letter can encrypt to many different ciphertext letters depending on its position, simple frequency analysis is much harder to apply.
Named after the 16th-century diplomat Blaise de Vigenère, the cipher was long considered unbreakable and earned the nickname le chiffre indéchiffrable — "the indecipherable cipher" — until Friedrich Kasiski published a general method for breaking it in 1863.
How this tool works
- Type or paste your message into the Input Text box.
- Enter a Keyword — only its letters are used, and it repeats cyclically over the text.
- Choose Encode to encrypt or Decode to reverse a message.
The result updates automatically. Letter case is preserved, and anything that isn't a letter — numbers, punctuation, spaces, emoji — passes through unchanged and does not consume a key letter. A small table shows the letter frequency of the output, a quick way to see how flat (well-scrambled) the ciphertext is.
The math is a per-letter Caesar shift: to encrypt, C = (P + K) mod 26; to decrypt, P = (C − K + 26) mod 26, where K is the current keyword letter.
Auto-key mode
Tick Auto-key to use the text auto-key variant. Here the keyword only seeds the first few letters; once it runs out, the plaintext itself continues the key stream. This removes the repeating pattern that makes the standard cipher vulnerable to Kasiski examination, making it considerably stronger. Decoding auto-key text works because each letter you recover immediately becomes part of the key for the letters that follow — so the same keyword reverses the message exactly.
Is the Vigenère cipher secure?
No. It was a genuine advance in its day, but it is trivially broken by modern computers using key-length detection (Kasiski or the Index of Coincidence) followed by per-position frequency analysis. Use it for puzzles, teaching, CTF challenges and historical curiosity — never for protecting real secrets. For actual encryption, use a modern algorithm such as AES.
Privacy
This tool runs entirely in your browser. Your text and keyword are never uploaded to a server.