Vigenere Cipher Encoder and Decoder
Encrypt and decrypt text with the Vigenere cipher using your own key. Letter case is kept and other characters stay as they are. Free, runs in your browser.
How it works
The Vigenere cipher shifts every letter by a different amount taken from a keyword. Number the letters A = 0, B = 1 … Z = 25. To encrypt, add the key letter to the text letter and wrap around after Z. To decrypt, subtract it. The key is repeated along the text, so with the key LEMON the first five letters are shifted by L, E, M, O, N, then the key starts again. Only the letters A to Z of the key are used, in any case. In the text only the letters A to Z are changed and their upper or lower case is kept. Digits, spaces, punctuation, letters of other alphabets and emoji stay as they are and do not use up a key letter. A key of one letter, such as D, shifts every letter by the same amount, which is the Caesar cipher.
Example: ATTACKATDAWN with the key LEMON becomes LXFOPVEFRNHR, and decrypting LXFOPVEFRNHR with the same key gives ATTACKATDAWN back.
Frequently asked questions
How do I encrypt text with the Vigenere cipher?
Choose Encrypt, type a key made of letters and paste your text. Each letter is shifted by the matching key letter, and the key repeats until the text ends. The result appears as you type and you can copy it with one click.
How do I decrypt a Vigenere cipher?
Choose Decrypt, enter the same key that was used to encrypt and paste the encrypted text. Without the key you cannot get the original text from this tool.
What happens to spaces, numbers and punctuation?
They are copied unchanged and they do not use up a letter of the key. Only the letters A to Z are shifted. Letters with accents, such as é or ł, are left as they are.
What if the key is shorter than the text?
The key is repeated. With the key KEY the letters are shifted by K, E, Y, K, E, Y and so on until the end of the text.
How is the Vigenere cipher different from the Caesar cipher?
The Caesar cipher shifts all letters by the same amount. The Vigenere cipher uses a keyword, so the shift changes from letter to letter. If the key has one letter, the two give the same result.
Is the Vigenere cipher secure?
No. It is a classical cipher and can be broken by analyzing a long enough text, so use it for puzzles, learning and games, not for real secrets.
Is my text sent to a server?
The encryption runs in your browser and your text and key are not sent anywhere.
More text tools
- Morse Code Translator
- Binary Translator
- ASCII Converter
- Hex to Text Converter
- Leet Speak Translator
- Caesar Cipher Encoder and Decoder
- Atbash Cipher Encoder and Decoder
- Word Counter and Character Counter
A classical cipher for puzzles and learning. It does not protect real secrets.