How to use the Vigenère cipher tool
- Choose the Direction: Encrypt or Decrypt.
- Type or paste your message into Input.
- Enter the Keyword. Only its letters count.
- Read the result below and copy it. To check your work, switch the direction and paste the result back in with the same keyword.
What it does and when to use it
The Vigenère cipher hides a message by shifting each letter by a different amount, set by a repeating keyword. It is a standard example in cryptography lessons, a favourite in puzzle hunts and geocaching, and a step up from simple shift ciphers.
It is important to be clear: this is a historical cipher, not modern encryption. It does not protect real data. For a fixed shift, use the Caesar cipher; for a simple letter mirror, try the Atbash cipher. If you want to compare a version where the message itself extends the key, see the autokey Vigenère cipher.
How it works
Number the letters A = 0, B = 1 … Z = 25. The keyword is repeated along the letters of the message:
- Encrypt: C = (P + K) mod 26
- Decrypt: P = (C − K + 26) mod 26
P is the plaintext letter, K the keyword letter and C the ciphertext letter. With the keyword LEMON, the first letter shifts by 11 (L), the next by 4 (E), then 12, 14 and 13, and the pattern repeats.
This tool keeps each letter’s case, skips anything that is not A–Z or a–z, and only moves to the next keyword letter after it has used one on a real letter. It runs in your browser.
Worked examples
ATTACK AT DAWN key LEMON → LXFOPV EF RNHR
Meet me at 9, by the gate! key KEY → Wicd qc kx 9, zi xfo kydi!
Wicd qc kx 9, zi xfo kydi! key KEY, Decrypt → Meet me at 9, by the gate!
abc key 123 → The keyword needs at least one letter A–Z.
The first line is the classic textbook example. In the second, “9,” and the spaces are copied across and the keyword K-E-Y keeps cycling over the letters only. The third line reverses it. The last shows the error you get when the keyword contains no letters.
Limits and tips
- Longer, non-repeating keywords are harder to break, but even a long keyword does not make the cipher safe.
- Agree with the other person on how spaces and punctuation are handled. This tool passes them through without using the key.
- Letters outside A–Z, including accented letters and other scripts, are not encrypted. Remove or replace them first if they would give the message away.
Frequently asked questions
Is the Vigenère cipher secure?
Does the keyword's case matter?
Why didn't the spaces change the result?
What happens to accented letters like é?
How is this different from a Caesar cipher?
How do we know nothing is uploaded? Test it yourself on the privacy proof page.