Vigenere Cipher Encoder and Decoder
Encode or decode a message with the classic Vigenere cipher. Type your text and a keyword, then pick encode or decode. Letters are shifted by the keyword while case is kept and spaces, digits and punctuation pass straight through.
How to use the Vigenere cipher
- Type or paste your text into the box.
- Enter a keyword made of letters, then choose Encode or Decode.
- Read the result update live and copy it.
Examples
Encode with a keyword
Text: HELLO, key: KEY, mode: Encode
RIJVS
Decode it back
Text: RIJVS, key: KEY, mode: Decode
HELLO
The classic textbook example
Text: ATTACKATDAWN, key: LEMON, mode: Encode
LXFOPVEFRNHR
Frequently asked questions
How does the Vigenere cipher work?
Each letter is shifted by an amount taken from the next letter of the keyword (A shifts 0, B shifts 1, and so on). The keyword repeats across the message, so the same plaintext letter can map to different letters depending on its position. To decode, the same shifts are subtracted with the same keyword.
What happens to spaces, numbers and punctuation?
Only the letters A-Z and a-z are shifted, and their case is preserved. Spaces, digits, punctuation and line breaks pass through unchanged, and they do not advance the keyword, so the keyword only lines up with the letters it actually transforms.
Does the case of my keyword matter?
No. The keyword is read for its letters only, so KEY, Key and key all produce the same shifts. Any non-letters in the keyword are ignored when deriving the shift amounts.
Is the Vigenere cipher secure encryption?
No. This is a classical cipher meant for puzzles, history and learning, not for protecting secrets. It was broken in the 1800s and is easy to crack with frequency analysis, especially with a short keyword. For real protection use a tool that applies modern, password-based encryption such as AES.
Is my text private?
Yes. The encoding and decoding run entirely in your browser. Your text and keyword are never uploaded to a server and nothing is stored.
Why do I need a keyword with at least one letter?
The shift amounts come from the letters in the keyword, so a keyword with no letters (empty or only digits and symbols) gives the cipher nothing to work with. The tool asks for at least one letter and otherwise reports an error instead of returning the text unchanged.
Related tools
Text Encrypt / Decrypt
Encrypt and decrypt text with a password using AES-GCM in your browser. Paste, set a password, copy the result. Nothing is uploaded and nothing is stored.
Reverse Text
Reverse text online by characters, words or lines. Flip a string backwards, reverse word order, or flip line order, then copy the result. Free and private.
Remove Line Breaks
Remove line breaks and paragraph breaks from text online. Flatten copied text into one line, keep spaces tidy, then copy the result. Free and private.
Add Line Numbers
Add line numbers to any text online. Set the start value, step, and separator, pad numbers to align, and copy or download the result. Free and private.
Bullet List Maker
Turn lines of text into a bullet or numbered list online. Pick dash, asterisk, dot, arrow or numbers, add indent, then copy. Free and private.
Caesar Cipher
Encode and decode text with the Caesar shift cipher. Pick any shift, see the result live, and brute force all 25 shifts. Runs entirely in your browser.