How to use the Vigenère cipher translator
- Enter a short plaintext or ciphertext message, then choose Encode or Decode.
- Enter a keyword made only of English A–Z letters. Case in the key is ignored; spaces, digits, accents, and punctuation are rejected so the convention stays unambiguous.
- Select Convert. The key repeats across English letters only. A space or punctuation mark is preserved and does not consume the next key letter.
- Copy result copies exactly the transformed text. Editing message, keyword, or direction immediately clears the previous output and copy status.
Vigenère formula and key alignment
Number A through Z from 0 to 25. Each key letter supplies a shift K: A means 0, B means 1, and Z means 25. Encoding uses Cᵢ=(Pᵢ+Kᵢ) mod 26; decoding uses Pᵢ=(Cᵢ−Kᵢ) mod 26. When the keyword ends, it starts again.
This implementation preserves the case of each message letter. It advances the key index only when the current message character is an unaccented English letter. Thus ATTACK AT DAWN with LEMON aligns the same way as ATTACKATDAWN. Spaces, punctuation, numbers, emoji, accents, and non-Latin scripts remain unchanged and do not change the alignment. This convention is stated because other historical or software variants may strip non-letters first.
Exact Vigenère examples
The standard vector with plaintext ATTACKATDAWN and keyword LEMON produces LXFOPVEFRNHR. Decode that ciphertext with LEMON to restore ATTACKATDAWN.
With spaces and case preserved, Attack at dawn! + LEMON → Lxfopv ef rnhr!. In A-BC D with keyword BC, the hyphen and space do not consume key letters, producing B-DD F.
When a keyword cipher tool helps
- Check a classroom table calculation, build or solve a puzzle where the keyword is already supplied, and compare how repeating shifts differ from one fixed Caesar shift.
- Decode only when the exact keyword and the same alignment convention are known. The tool does not infer a probable key from language patterns.
Keyword, text, and security limits
- The keyword must contain one or more A–Z letters and nothing else. The message needs at least one A–Z letter and may contain up to 500 characters.
- Repeating-key Vigenère is a historical educational cipher, vulnerable to analysis, and not suitable for passwords or confidential messages. This page provides no automatic key guessing, Kasiski analysis, autokey mode, file upload, storage, or network decoding.
Vigenère cipher FAQ
Do spaces advance the keyword?
No. Only A–Z or a–z in the message consumes a key letter; all other characters stay in place.
Does keyword case change the result?
No. lemon and LEMON supply the same shifts, while message letter case is preserved.
Why is my keyword rejected?
This page requires a single A–Z word. Remove spaces, digits, punctuation, accents, and other scripts.
Can the decoder discover a missing keyword?
No. It performs exact conversion with the key provided and does not promise an automatically inferred plaintext.