Join the Official Discord

Vigenère cipher decoder

Have the keyword? Decode instantly. No keyword? Choose “Find the key” and we'll recover it.

Mode
Result

Likely keys

    How the Vigenère cipher works

    Write a keyword under the message, repeating it as often as needed. Each key letter says how far to shift the letter above it: A is no shift, B is one, Z is twenty-five. It's a Caesar cipher with a different shift for each letter.

    With the key LEMON, ATTACK AT DAWN lines up against LEMONL EM ONLE and encodes to LXFOPV EF RNHR. The two T's in ATTACK come out as X and F. That's the cipher's strength: one plaintext letter can turn into many different cipher letters.

    How we find the key when you don't have it

    1. Find the key length. If the key has 5 letters, every fifth letter was shifted by the same amount, so that column of letters keeps English's lumpy frequencies. We test lengths 1 to 20 and keep the ones whose columns look most like English. This uses the index of coincidence.
    2. Solve each column as a Caesar cipher. For every column we try all 26 shifts and pick the one whose letter counts best match English.
    3. Read the whole thing. Each candidate key decrypts the full message, and we rank the results by how English they read. The best few are listed so you can try the runners-up.

    It needs some text to work with. Ten letters of ciphertext per key letter is a good rule of thumb. If the top answer still looks wrong, the cipher may be a cousin like Beaufort or autokey, or not polyalphabetic at all. The cipher identifier can help you check.

    Spotting a Vigenère cipher

    • The letter frequencies are flat. Run frequency analysis: no letter stands out the way E does in English, and the index of coincidence is well below 0.066.
    • Repeated chunks of ciphertext sit a multiple of the key length apart. That's the clue Charles Babbage and Friedrich Kasiski used to break it in the 1800s, after three centuries of it being called le chiffre indéchiffrable.
    Step-by-step guide How to solve a Vigenère Cipher by hand, with a worked example

    Questions

    How do I decode Vigenère without the key?

    Choose “Find the key”. The tool tests every key length up to 20, splits the message into that many columns, and works out each column's shift from its letter frequencies. It then ranks the candidate keys by how English each decryption reads.

    How long does the message need to be to crack it?

    As a rough rule, at least ten times the key length. A 5-letter key needs about 50 letters of ciphertext. Shorter messages can still crack, but the top guess is less reliable.

    Does the key advance on spaces and punctuation?

    Not here, and not in most puzzles. The key only steps forward on letters, so spacing and punctuation pass through unchanged.

    Why is Vigenère harder to break than Caesar?

    Each letter is shifted by a different amount depending on its position under the key, so the same plaintext letter becomes different ciphertext letters. That flattens the letter frequencies that give a Caesar or substitution cipher away.

    More cipher tools

    See all cipher tools →