Vigenère Cipher Encoder and Decoder

The Vigenère cipher is a classic way to hide a message: each letter is shifted by a letter from a secret keyword, so the same letter can become a different letter every time it appears. This free Vigenère cipher encoder and decoder turns your text into a secret message with a keyword you choose, or decodes a message back to plain text. Type your text and keyword, pick Encode or Decode, and press Convert. Everything runs in your browser and nothing is saved or sent anywhere.

How to use this Vigenère cipher encoder and decoder

Pick a direction first: Encode or Decode. Type your message in the text box, then type a keyword — letters only, no numbers or spaces — and press Convert. To encode, the tool shifts each letter of your message by the matching letter of the keyword, repeating the keyword as many times as needed. To decode, it shifts each letter back again. Spaces, numbers and punctuation are left exactly as they are, and capital letters stay capital. Press Copy result to copy the message.

How it works

Each letter of the alphabet has a number: A is 0, B is 1, all the way to Z is 25. Each keyword letter gives a shift: A shifts by 0, B by 1, and so on. To encode, add the shift to the message letter and wrap around after Z — so M, which is 12, plus L, which shifts by 11, gives 23, which is X. To decode, subtract the shift instead. Because the keyword repeats, the same message letter can turn into a different letter each time it appears, which is what makes the Vigenère cipher much harder to crack than a simple Caesar shift, where every letter moves by the same amount.

Worked example

Pick “Encode”, type “Meet at dawn” and use the keyword “LEMON”, then press Convert — the answer is “Xiqh ne hmka”. The classic example is “ATTACKATDAWN” with the keyword “LEMON”, which encodes to “LXFOPVEFRNHR”. Now pick “Decode”, paste “LXFOPVEFRNHR” with the same keyword “LEMON” and press Convert — the answer is “ATTACKATDAWN” again. Capitals are kept as capitals, so “Attack at dawn” encodes to “Lxfopv ef rnhr”. Try “Hello” with the keyword “KEY” and you get “Rijvs”.

Frequently asked questions

What is the Vigenère cipher?

The Vigenère cipher is a method of encrypting text that was first described in the 1500s. It uses a keyword to shift each letter of a message by a different amount, so the same letter in the message can become a different letter each time. It stayed unbroken for about 300 years and was once called “the indecipherable cipher”.

How do I pick a good keyword?

Use a long keyword that is hard to guess, and never use a single letter or a word that appears in the message itself. A longer keyword means the shift pattern repeats less often, which makes the message harder to crack. A keyword of one letter is just a Caesar shift, so use at least a few letters.

Why are spaces and punctuation not encoded?

The classic Vigenère cipher only works on letters, so spaces, numbers and punctuation are carried through unchanged. That keeps the message readable in shape and makes decoding simple: the person decoding only needs the keyword, not a rule for the punctuation.

How is this different from a Caesar cipher?

In a Caesar cipher every letter shifts by the same fixed amount, so the pattern is easy to spot. In a Vigenère cipher the shift changes with each letter of the keyword, so the same plain letter can encode to many different letters. That makes frequency analysis — counting which letters appear most — much less useful against it.

Is my message private here?

Yes. The conversion runs entirely in your browser. Nothing you type is uploaded, stored or sent to any server. Remember though that the Vigenère cipher is a historical puzzle cipher, not modern security — never use it for real secrets.

What other tools can I use?

Try our Caesar Cipher Encoder and Decoder for a fixed-shift cipher, the ROT13 Encoder and Decoder for a quick letter swap, the Morse Code Translator for dots and dashes, and the Binary Converter for number bases. See all of them on our tools page, use our free calculators, or return to the homepage.

Disclaimer: The Vigenère cipher is a historical puzzle cipher and is not secure by modern standards. Use it for fun, games and learning only, never for real secrets. No personal data is collected or saved.

Scroll to Top