How to use the vigenere cipher tool
- Choose Encrypt or Decrypt.
- Type a key word made of letters. Only letters A to Z are used.
- Type or paste your text. Capital and small letters keep their case.
- Copy the result. Tick the option for uppercase groups of five if you want the classic cipher look.
ATTACK AT DAWN with the key LEMON
The key repeats along the letters: LEMONLEMONLE. A + L = L, T + E = X, T + M = F, A + O = O, C + N = P, K + L = V, and so on, where each letter is shifted by the key letter's position, A = 0 to Z = 25.
The text ATTACKATDAWN becomes LXFOPVEFRNHR. With spaces kept, ATTACK AT DAWN becomes LXFOPV EF RNHR, because spaces do not use up a key letter. Decrypting with the same key turns it back.
A historical cipher, not security
The Vigenere cipher was described in the 1500s and was long called unbreakable, but methods to break it were published in the 1800s, and a computer breaks it in a moment today. Use it for puzzles, escape rooms, classroom lessons and games. Never use it to protect passwords, messages or anything private. For real encryption of text, use the AES text tool.
Compared with the Caesar cipher, which shifts every letter by the same amount, the Vigenere cipher shifts each letter by a different amount from a repeating key. That hides the usual letter frequencies better, but a long message and a short key still leave patterns.
Rules used here
Only the 26 letters of the English alphabet are changed. Digits, spaces, punctuation, accented letters and emoji pass through unchanged and do not use up a key letter. The key is turned to capital letters and anything not A to Z is ignored. An empty key is an error. A key of A shifts by 0, so it leaves the text as it was.
Text of up to 500,000 characters is handled in your browser and nothing is uploaded. For other fun encodings see the NATO phonetic alphabet and the binary translator.
Assumptions and limits
- The alphabet is the 26 letters A to Z. Other characters pass through unchanged.
- Non-letters do not advance the key.
- The key uses only its letters, in capitals.
- The cipher is shown for learning and puzzles and gives no real protection.
Frequently asked questions
How does the Vigenere cipher work?
Each letter is shifted forward by the number matching the key letter at that position, A = 0 to Z = 25, and the key repeats. To decrypt, shift back.
What is ATTACKATDAWN with the key LEMON?
LXFOPVEFRNHR. It is the classic example for this cipher.
Is the Vigenere cipher secure?
No. It was broken long ago and a computer can break it quickly. Use it only for games, puzzles and learning.
Do spaces use up a key letter?
Not here. Spaces and punctuation pass through and the key moves on only when a letter is shifted.