Vigenère Cipher Encoder & Decoder
Encode or decode a Vigenère cipher with a keyword, see the key lined up under each letter, and estimate an unknown key with the index of coincidence.
The Vigenère cipher shifts each letter by a different amount, set by the letters of a keyword: A shifts by 0, B by 1 and so on to Z, which shifts by 25. The keyword repeats along the message. With the key LEMON, ATTACKATDAWN becomes LXFOPVEFRNHR: A plus L gives L, T plus E gives X and T plus M gives F. In this tool only letters use up a key letter; spaces, digits and punctuation pass through unchanged and don't advance the key. For short messages a table shows each letter, its key letter and the result. If you have ciphertext but no key, the estimator uses the index of coincidence to guess the key length and solves each column as a Caesar shift. Treat its answer as an estimate: it needs about 100 letters to be reliable.
Key letters used: LEMON (shifts 11, 4, 12, 14, 13)
Only the letters A–Z use up a key letter. Spaces, digits and punctuation pass through unchanged and don't advance the key.
Keystream
Each letter with the key letter that shifts it. Gaps show characters that don't use a key letter.
| Text | A | t | t | a | c | k | a | t | d | a | w | n | ||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Key | L | E | M | O | N | L | E | M | O | N | L | E | ||
| Cipher | L | x | f | o | p | v | e | f | r | n | h | r |
Vigenère square (tabula recta)
To encode by hand, find the plaintext letter's column and the key letter's row; the letter where they meet is the ciphertext. To decode, go along the key letter's row to the ciphertext letter and read the column heading.
| A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| A | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z |
| B | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | A |
| C | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | A | B |
| D | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | A | B | C |
| E | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | A | B | C | D |
| F | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | A | B | C | D | E |
| G | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | A | B | C | D | E | F |
| H | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | A | B | C | D | E | F | G |
| I | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | A | B | C | D | E | F | G | H |
| J | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | A | B | C | D | E | F | G | H | I |
| K | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | A | B | C | D | E | F | G | H | I | J |
| L | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | A | B | C | D | E | F | G | H | I | J | K |
| M | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | A | B | C | D | E | F | G | H | I | J | K | L |
| N | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | A | B | C | D | E | F | G | H | I | J | K | L | M |
| O | O | P | Q | R | S | T | U | V | W | X | Y | Z | A | B | C | D | E | F | G | H | I | J | K | L | M | N |
| P | P | Q | R | S | T | U | V | W | X | Y | Z | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O |
| Q | Q | R | S | T | U | V | W | X | Y | Z | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P |
| R | R | S | T | U | V | W | X | Y | Z | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q |
| S | S | T | U | V | W | X | Y | Z | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R |
| T | T | U | V | W | X | Y | Z | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S |
| U | U | V | W | X | Y | Z | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T |
| V | V | W | X | Y | Z | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U |
| W | W | X | Y | Z | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V |
| X | X | Y | Z | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W |
| Y | Y | Z | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X |
| Z | Z | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y |
Common use cases
- Decode a keyword cipher found in an escape room, puzzle hunt or ARG
- Recover the key of a long Vigenère message you don't have the keyword for
- Show students how a repeating key lines up with the message
- Write a keyword puzzle where the key is hidden somewhere else in the room
How to use
- Choose Encode or Decode.
- Enter the keyword. Only its letters are used, so spaces and digits in the key are ignored.
- Type or paste your text. The result updates as you type.
- For messages up to 60 characters, check the keystream table to see which key letter shifted each letter.
- No key? In Decode mode, open the key estimator and apply the suggested key.
FAQ
What's the difference between Vigenère and Caesar?
A Caesar cipher shifts every letter by the same amount. Vigenère uses a keyword, so the shift changes from letter to letter and repeats with the keyword. A one-letter Vigenère key is a Caesar shift: the key D is the same as a shift of 3.
Do spaces and punctuation use up key letters?
Not in this tool. Only the letters A to Z advance the key, which is the usual convention. Some tools advance the key on every character, so if a decryption goes wrong after the first word, the message may have used that convention instead.
Can a Vigenère cipher be broken without the key?
Yes. The index of coincidence and Kasiski examination reveal the key length, and each column of letters that share a key letter is then a simple Caesar shift. The estimator here does this automatically, but it can be wrong for short messages or long keys.
Why was Vigenère called unbreakable?
It resisted ordinary frequency analysis for about three centuries and was known as le chiffre indéchiffrable. Charles Babbage broke it in the 1850s and Friedrich Kasiski published a general method in 1863. Only a random key as long as the message, a one-time pad, can't be broken this way.
Related tools
- Caesar Cipher Encoder & DecoderEncode or decode a Caesar cipher with any shift from 1 to 25, or crack one: all 25 shifts listed and ranked…
- Cipher IdentifierPaste a mystery code to see its letter frequencies and index of coincidence, a ranked list of likely ciphers…
- Atbash Cipher Encoder & DecoderEncode or decode Atbash, the cipher that reverses the alphabet (A↔Z, B↔Y). One box works both ways, keeps…
- Rail Fence CipherEncode or decode a rail fence (zigzag) cipher with 2 to 20 rails and an optional offset, see the zigzag grid…
- Cryptogram GeneratorTurn a phrase into a printable cryptogram: a random letter substitution where no letter stands for itself…
- Pigpen Cipher TranslatorTurn text into pigpen cipher symbols, download them as SVG or PNG for printing, and decode pigpen by clicking…