Codes / Classical ciphers

Vigenère Cipher Encoder and Decoder

Encrypt and decrypt text with the Vigenère cipher and a keyword, with a table showing how each letter is shifted by the repeating key.

Vigenère Cipher Encoder and Decoder: The Vigenère cipher shifts each letter by an amount set by the matching letter of the key, A for 0 up to Z for 25, and repeats the key along the text. With the key LEMON, ATTACKATDAWN becomes LXFOPVEFRNHR. Because the shift changes from letter to letter, simple letter-frequency counting does not break it, which earned it the name le chiffre indéchiffrable, until Kasiski and Babbage found ways to crack it in the 19th century. Runs 100% locally in your browser with zero server file uploads.

Category
Text tools
Runs
In your browser
Cost
Free · no sign-up
Availability
Ready to use
Vigenère cipherLocal processing

Runs entirely in your browser

TextATTACKATDAWN
KeyLEMONLEMONLE
Shift+11+4+12+14+13+11+4+12+14+13+11+4
ResultLXFOPVEFRNHR

Each letter is shifted by the matching letter of the key, A = 0 to Z = 25, and the key repeats along the text. Spaces and punctuation are kept and do not use up key letters.

The Vigenère square

On paper, the cipher uses a 26 by 26 table of alphabets, each shifted one place further than the one above. Find the text letter along the top and the key letter down the side; the letter where they meet is the ciphertext letter.

For the single-shift version, see the Caesar cipher; for strong modern encryption, encrypt text with AES.

How it was broken

In 1863 Friedrich Kasiski published the method: find repeated groups of letters in the ciphertext, measure the distances between them, and the key length is likely a common factor. Split the text into that many columns, and each column is a Caesar cipher solved by letter frequencies.

How to use it

  1. Type the text and the key, such as LEMON.
  2. Choose Encrypt or Decrypt.
  3. Read the result, and the table lining up text, key, and shift for the first letters.

Privacy & limitations

Your text and key stay in your browser.

Related tools

Frequently asked questions

How strong is the Vigenère cipher?

Much stronger than a Caesar shift, but breakable: repeated patterns reveal the key length, after which each column is a simple Caesar cipher.

What happens to spaces and punctuation?

They are kept as they are and do not use up letters of the key, the usual convention.

What makes a better key?

A longer key with no pattern; a random key as long as the message, used once, becomes the one-time pad, which cannot be broken.

Free tool · runs in your browser · no account required