How to use the Vigenere Cipher Tool
- 1. Type the textEnter the message to encrypt, or the ciphertext to decrypt.
- 2. Enter the keywordUse letters only; the key repeats along the message.
- 3. Read the stepsSee the result and the shift for each letter.
How Vigenère works
Vigenère is a series of Caesar ciphers. Each letter of the keyword gives a shift (A = 0, B = 1 … Z = 25), and the key repeats along the message. Encryption is Cᵢ = (Pᵢ + Kᵢ) mod 26, decryption is Pᵢ = (Cᵢ − Kᵢ) mod 26.
The classic textbook example: ATTACKATDAWN with key LEMON. The key repeats as LEMONLEMONLE. A + L (11) = L, T + E (4) = X, T + M (12) = F, and so on, giving LXFOPVEFRNHR. The step table shows each letter, its key letter and the shift. Spaces and punctuation pass through and do not use up key letters.
Strength and how it was broken
For about 300 years Vigenère was called "le chiffre indéchiffrable", because the same letter encrypts differently depending on its position, which defeats simple frequency counts. In the 1800s Charles Babbage and Friedrich Kasiski showed how to break it: repeated words often line up with the key, revealing its length, and then each position is just a Caesar cipher solved by letter frequency.
- Longer, random keys are much harder to break.
- A key as long as the message, truly random and never reused, becomes a one-time pad, which is unbreakable.
- Modern ciphers such as AES are what you should use for real data.
Vigenère is ideal for learning, puzzles and CTFs. Code it in Python with a loop over the message and the key index. Compare with the single-shift Caesar cipher and with byte-based XOR encryption.
Frequently asked questions
Why does my key with spaces still work?
Non-letters in the key are removed, so "LE MON" becomes LEMON.
Is the result always uppercase?
No. Each letter keeps its own case; only the shift comes from the key.
Is the Vigenere Cipher Tool free?
Yes, the Vigenere Cipher Tool is free. The first time you see your first result, you are asked for your name and WhatsApp number once. After that, this and every other Uncodemy tool opens straight away without the form.