Vigenère Cipher Encoder + Decoder

The Vigenère cipher uses a keyword to shift each letter by a different amount — much harder to break than Caesar (which uses a single shift). Designed in the 16th century, "broke" in the 19th. Still useful for puzzles, CTF challenges, and teaching cryptanalysis.

How to use the Vigenère Cipher Encoder + Decoder

Pick encrypt or decrypt. Type a key (letters only). Non-letter characters pass through unchanged. Case is preserved on output.

The keyed Caesar cipher

The Vigenère cipher is a polyalphabetic substitution: instead of shifting every letter by the same amount like a Caesar cipher, it uses a repeating keyword to vary the shift letter by letter. With the key LEMON, the first letter shifts by L's position in the alphabet, the second by E's, and so on, repeating the key as needed. Because the same plaintext letter maps to different ciphertext letters depending on its position, simple frequency analysis fails.

Devised in the 16th century, it kept its reputation as the indecipherable cipher until 19th-century methods — Kasiski examination and the index of coincidence — cracked it by finding the key length, then attacking each position as a Caesar cipher. Today it is a teaching staple and a CTF favourite rather than real security. This tool encrypts and decrypts, passing non-letters through and preserving case.

Common use cases

  • Teaching cryptanalysis — show why a repeating key defeats naive frequency analysis but not Kasiski.
  • Puzzles and CTFs — encode or solve a classic Vigenère step in a challenge.
  • Historical curiosity — reproduce the cipher that resisted attack for centuries.
  • Decoding with a known key — recover plaintext when you have the keyword.
  • Comparing with Caesar — see how varying the shift per letter changes the output.

Frequently asked questions

How is Vigenère different from a Caesar cipher?

Caesar shifts every letter by one fixed amount; Vigenère shifts by a sequence of amounts taken from a repeating keyword. That variation is what makes the same plaintext letter encode to different ciphertext letters.

Is the Vigenère cipher secure today?

No. Once the key length is found — by Kasiski examination or the index of coincidence — each key position reduces to a Caesar cipher and falls to frequency analysis. It is a learning and puzzle cipher, not protection.

What makes a good key?

A longer key, ideally as long as the message and never reused, resists analysis better; a short repeating key is the weakness attackers exploit. Taken to its limit — a random key as long as the text, used once — the idea becomes the unbreakable one-time pad.

What happens to spaces, digits, and punctuation?

They pass through unchanged, and only letters are shifted. Keeping spaces preserves word boundaries, which can help an attacker, so puzzles sometimes strip them first.
Embed this tool on your site

Free to embed, no attribution required (but appreciated). Paste this where you want the tool to appear: